C equivalent to fstream's peek?

I know in C++, you're able to peek at the next character by using: in.peek();. How would I go about this when tryin...

Difference between & and && in C??

What is the difference between & and && in C? My teacher gave me this example: int a = 8; int b = 4; p...

Can someone explain how to append an element to an array in C programming??

If I want to append a number to an array initialized to int, how can I do that? int arr[10] = {0, 5, 3, 64}; arr[] ...

When to use malloc for char pointers?

I'm specifically focused on when to use malloc on char pointers char *ptr; ptr = "something"; ...code... ...code......

How to kill a child process by the parent process??

I create a child process using a fork(). How can the parent process kill the child process if the child process cann...

PTHREAD_MUTEX_INITIALIZER vs pthread_mutex_init ( &mutex, param)?

Is there any difference between pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; Or pthread_mutex_t lock; pthr...

What are the GCC default include directories??

When I compile a very simple source file with gcc I don't have to specify the path to standard include files such as...

What is the difference between C and embedded C??

Can any body tell me the differences between them? ...

How to printf “unsigned long” in C??

I can never understand how to print unsigned long datatype in C. Suppose unsigned_foo is an unsigned long, then I t...

C - Comparing string literal with character array?

I am new to C and am still a bit confused about how to use strings via character arrays. In my C program, I am acce...

Zombie process vs Orphan process?

A Zombie is created when a parent process does not use the wait system call after a child dies to read its exit stat...