C Programming Language Example By Topics

Introduction to C

Example Statement for Introduction to C Language
1. Print Hello World
2. Print Value of an Integer
3. Get input from user
4. Addition of Two Number

If Statement and Switch case

Example Statement for If Statement and Switch Case in C Language
1. Find Perfect Leap Year
2. ATM money dispatch count while currencies are 1000,500 and 100
3. Display day for the entered date by user
4. Check number is greater than 100 or not
5. Switch case (Resolve Error)





Loops in C

Example Statement for Loops in C Language
1. Print 1 to 10 using for loop
2. Print All ASCII Values
3. Check number is prefect number or not
4. Convert the given binary number into decimal
5. Print Diamond Shape
6. Check leap year in a given year range
7. Convert number to binary using bitwise operators
8. Find the value of sin(x) using the series up to the given accuracy without using math.h library functions.

Array

Example Statement for Array in C Language
1. Accept a list of data items and find the second largest and second smallest elements in it
2. Copy element of one array into another
3. Cyclically permute the elements of an array
4. Delete duplicate elements in an array
5. Delete the specified integer from the list
6. Find unique element in two arrays
7. Minimum element location in array
8. Accept an array of 10 elements and swap 3rd element with 4th element using pointers

String

Example Statement for String in C Language
1. Check whether two strings are anagrams or not
2. Find a frequenct of character in string
3. Insert substring into a string
4. Substring from a position to length
5. Check if a string is a subsequence of another string
6. Delete vowels from a string





Pointer

Example Statement for Pointer in C Language
1. Add numbers using call by reference
2. Multilevel Pointer [With Explanation]
3. Sum of array elements using pointers

Structure and Union

Example Statement for Structure and Union in C Language
1. Calculate Size of Structure
2. Use structure within union
3. Find the size of a union

Files Handling

Example Statement for Files Handling in C Language
1. Illustrate as to how the data stored on the disk is read
2. Write static data in file and read from file

Graphics

Example Statement for Graphics in C Language
1. Drawing Line in Graphics Mode
2. Make Static Countdown
3. Draw Moving a Car
4. Press Me Button Game
5. Draw Smiling Face Animation
6. Make Traffic Light Simulation
You've successfully subscribed to Developer Insider
Great! Next, complete checkout for full access to Developer Insider
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.