C Aptitude Questions and answers with explanation

C Aptitude 24C program is one of most popular programming language which is used for core level of coding across the board. C program is used for operating systems, embedded systems, system engineering, word processors,hard ware drivers, etc. In this site, we have discussed various type of C programs till date and from now on, …

C Aptitude Questions and answers with explanation

C Aptitude 15C program is one of most popular programming language which is used for core level of coding across the board. C program is used for operating systems, embedded systems, system engineering, word processors,hard ware drivers, etc. In this site, we have discussed various type of C programs till date and from now on, …

C program to implement SJF algorithm.

Write a C program to implement SJF algorithm.Shortest Job First(SJF) is the CPU scheduling algorithm. In SJF, if the CPU is available it allocates the process which has smallest burst time, if the two process are same burst time it uses FCFS algorithm.Read more about C Programming Language . and read the C Programming Language …

C Program to lock file using semaphores.

Write a C Program to lock file using semaphores.Using semaphores, We can control access to files, shared memory and other things. The basic functionality of a semaphore is that you can either set it, check it, or wait until it clears then set it (“test-n-set”). In C semaphores functions defined in the sys/sem library. Read …

C Program to solve Dining philosophers problem.

Write a C Program to solve Dining philosophers problem.Dining philosophers problem is a classic synchronization problem.A problem introduced by Dijkstra concerning resource allocation between processes. Five silent philosophers sit  around table with a bowl of spaghetti. A fork is placed between each pair of adjacent philosophers. Each philosopher must alternately think and eat.Eating is not …

K & R C Programs Exercise 7-9.

K and R C, Solution to Exercise 7-9:K and R C Programs Exercises provides the solution to all the exercises in the C Programming Language (2nd Edition). You can learn and solve K&R C Programs Exercise.Write a C Functions like isupper() can be implemented to save space or to save time. Explore both possibilities. Read …

C program To show examples of the strtol function.

C program To show examples of the strtol function.strtol() function converts the string to the long integer, and strtol() can accept the number in various bases, and converts it into the decimal number or base. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for personal and learning …

C Program to demonstrate the strtok function.

C Program to demonstrate the strtok function.strtok function breaks pointed by the string1 into sequence of tokens, which are sequences of contiguous characters separated by any of the characters that are part of delimiters.In this program we split the test_string, i,e “string to split up ” tostringtosplitupRead more about C Programming Language . /************************************************************ You …

C Program to demonstrate the strstr function.

C Program to demonstrate the strstr function.strstr function finds the substring in a string. strstr() returns pointer of the first occurrence of the string other wise it returns the null pointer is returned.In this program strstr returns a pointer into ‘string’ if ‘test’ is found, if not found, NULL is returned. Read more about C …

K & R C Programs Exercise 5-8.

K and R C, Solution to Exercise 5-8:K and R C Programs Exercises provides the solution to all the exercises in the C Programming Language (2nd Edition). You can learn and solve K&R C Programs Exercise.There is no error-checking in the function day_of_year or month_day. Remedy this defect. In day_of_year we check for reasonable values …