Hi,
Suppose an IP 172.17.18.19 is got binded with other IP 172.17.18.20 using TCP socket,then 172.17.18.19 is not allowed to bind with any other IP say 172.17.18.21.Wh at i need is how can find that 172.17.18.19 is got connected with some IP(172.17.18.20 ). Is there any command is in linux available to detect the IP or tcpdump command is helpful?..pleas e suggest me..am bit new to Networking :-(
User Profile
Collapse
-
chansra agnuru replied to Handling scanf(reading values) in a program at once while executing the programin CHi,
I have tried
echo "peter\nLes slie great"| ./a.out FIRST SECOND
It worked.Thanks for the information you have given till now though i have squeezed you!!.. :-)) -
chansra agnuru replied to Handling scanf(reading values) in a program at once while executing the programin CYes by using the above command we can pass value to only one scanf/gets. If the program is having multiple scanfs then how can we pass?For better understanding am sending the code..
...Code:int main( int argc, char* argv[]) { char buf[20]; char bug[20]; printf("fisrt arg:%s\n",argv[1]); printf("second arg:%s\n",argv[2]); printf(" enter name1:"); gets(buf); printf("EnterLeave a comment:
-
chansra agnuru replied to Handling scanf(reading values) in a program at once while executing the programin CI agree with you in the first case (__argc==3) i am asking about else part which you have sent.From the command prompt we can execute a program by giving required arguments right.so how can i give values for a program during execution time(like arguments)inste ad giving at run time and press ENTER for scanf??.I hope this will clear :-)Leave a comment:
-
chansra agnuru replied to Handling scanf(reading values) in a program at once while executing the programin Cya the program required two arguments like i mentioned, but how can i get rid of entering name after execution??..is their any facility to read vlues for scanf at execution time itself??Leave a comment:
-
chansra agnuru started a topic Handling scanf(reading values) in a program at once while executing the programin CHandling scanf(reading values) in a program at once while executing the program
Hi,
I need some information regarding how to handle scanf values while executing the program itself.
For example:
suppose the program exe name is BYTE then...Code:main(int argc, char* argv[]) { char str[20]; printf("first argument: %s",__argv[1]); printf("Second argument: %s",__argv[2]); printf("Enter your name:"); gets(str); )
No activity results to display
Show More
Leave a comment: