C Programming Code Examples
C > For Loops and While Loops Code Examples
C program to convert Decimal to Binary number system
Code Shows a Client Server in C language -
Message queue program that shows a client server implementation this is the reciever program using Message Queues. Let us set up the message queue. Then the messages...
Find the two Elements such that their Sum -
Initialize the array named array[] with the random values. Call function minabsvaluepair and pass array and its size as parameters. In the function definition receive parameters...
Program Code find First Digit of a number -
Finding the first digit of any number is little expensive than last digit. To find first digit of a number we divide the given number by 10 until number is greater than 10. At the end...
Find last Occurrence of Character in String -
C program to input any String from user and find the Last occurrence of a given character in the string. Input String from user, 'Store it' in some variable say 'str'. Declare a index =-1
Program Code Copy String by While Loop -
C program 'Copy one string to another' string using 'While loop'. Logic to copy one string to another string. Copy 'text1 to text2' character by character. Input a string from user, store it
Use of typedef in Structure in C Language -
Typedef makes the code short and improves readability. In the above discussion we have seen that while using structs every time we have to use the lengthy syntax, which makes
C Codes Implement Recalibrate Command -
Check whether the FDC is ready. Read status of main status register. Check whether FDC is ready. Input the command parameters. Enter command parameters. Check the status of...
C++ Wheel Sieve Generate Prime Number -
This is a C++ Program to find 'Prime number' between the given range using 'Wheel Seive' method. "Wheel Factorization" is a graphical method for manually performing preliminary