Just wanted to drop by and say hello to everyone. I used to be active back in the 2000s. While I don't program in C anymore, this was one of the first online communities I participated in.
Type: Posts; User: PING
Just wanted to drop by and say hello to everyone. I used to be active back in the 2000s. While I don't program in C anymore, this was one of the first online communities I participated in.
What error are you getting?
Most servers have ICMP echo (ping) turned off. It's best not to rely on ping / traceroute as there is no guarantee about their behavior.
case 'r' :
case 'R' :
//insert code here
break;
There is no guaranteed way by which you can monitor the intermediary routers. One way to keep congestion low is to keep the UDP packet size large enough. You could try sending probe packets every now...
What do you think?
Yes it is necessary.
Have you first tried printing the triangle values without the formatting?
You're supposed to swap the values instead of just assigning sort[i] the value of sort[j].
printf("\n\nRoot1=%f\n\nRoot2=%f\n,root1,root2");
Do you see anything wrong with this statement? Pay attention to the warnings your compiler emits. Also, include <stdio.h>
Get a copy of Linux System Programming - O'Reilly Media from a local bookstore. It should get you started on the basics. Once you are comfortable with the introductory material covered in the book,...
From what I understand, you want to get started with network programming, right? How about implementing a command line chat client and a server for starters? You need to mention what you are aiming...
Start off with writing a simple file transfer program or a chat server. Then take up an end to end protocol of your choice and implement it from scratch. Post that you can move over to more advanced...
As I said, fflush(stdin) is wrong as behavior of fflush() with input streams results in undefined behavior. You need to gobble up the '\n's. You can simply put a getchar() in your scenario in place...
Actually, the correct thing would be mesg[n] as read() might return a value less than noBytes. Don't try to capture the \n in scanf().
scanf();
//gobble up all \ns
printf();
fgets();
...
It should be :
mesg[n] = '\0';
You should not fflush() input streams. You should ideally clear it using getchar(). Check the FAQ on how to clear stdin.
socket(), sendto(). As simple as that !
You will need a library like CURL that lets you make HTTP calls.
You could do this using signals. Set up an alarm for the required timeout and in the handler function, reap the child or kill it.
atoi(num) is perfectly safe in the scenario you've described.
The type of the variable 'name' is 'char'. The %s modifier expects a 'char*'. You need to either make 'name' a character array
char name[SOME_LIMIT]; or make it a character pointer
char* name and...
sizeof(buff) is 11. That should give you a hint.
You need to wait for your threads to exit. See pthread_join().
I don't understand why you are having so many issues with it. You just have to read the input from stdin and write the output to stdout. You can check out the FAQ under the help menu on the site for...
You could start applying for other jobs. When you find one, you can put in your papers at the current company and join the other one. Also, isn't it possible for you to talk to your managers and let...