C Programming Practice Questions and Answers
1. WAP (Write A Program) to swap two numbers using a third variable.
2. WAP to swap two numbers without using a third variable.
3. WAP to find the area of the rectangle.
4. WAP to find the area of the circle.
5. write a C prog to calculate sum of digit of given no
6. write a prog to swap two numbers using bitwise operator.
7. C Program to find ASCII value of a Character.
8. WAP to convert Temperature in Celsius to Fahrenheit (Temperature conversion Formulae f=c*9/5+32, c=(f-32) *5/9)
9. C program to find the Size of int, float and char
10.WAP to check if a number entered is positive or negative or zero.
11.WAP to check if a number entered is even or odd
12.WAP to check if a character entered is a vowel or a consonant.
13.WAP to check if a character entered is uppercase or lowercase.
14.WAP to check if a character entered is an alphabet, number or a symbol.
Percentage |
Grade |
81% to 100% |
A |
61% to 80% |
B |
40% to 60% |
Pass |
Less than 40 % |
Fail |
19) write a C prog to check whether given no is Armstrong or not.
20) accept no check it is palindrome or not
21) write a C prog to check whether given no is perfect or not
23) C program to Display Factors of a Number
Number Choice |
Arithmetic Operation |
1 |
Addition |
2 |
subtraction |
3 |
Multiplication |
4 |
Division |
Aa Bb Cc
Aa Bb Cc Dd
a
ab
abc
abcd
abc
ab
a
37) display pattern for n lines
1 2 3 4
5 6 7
8 9
10
38)Display Star Pattern (Pyramid Star Pattern)
39) write prog to generate following pattern for nlines 1 3 5 7 9 11
1
3 5
7 9 11
40) write prog to display multiplication table up to given no .
41) display each digit in words
42) Write a C prog to convert decimal no into binary, octal, hexadecimal write separate user defined function for each option
43) write a C prog to display transpose of matrix using user defined function
45) C Program to Reverse the Contents and Print it.
46) Copy the content of one into another
47) Accept string from user & replace all occurrences of 'a' by '*' symbol
48) sum of elements of mxn matrix
49). write a prog to calculate factorial of given no using recursion
50) C program to Reverse a Number
51) Write a C program to check if a number is a palindrome.
52) Implement a program to convert a decimal number to binary.
53) Create a program to find the factorial of a number using recursion.
54) Implement a program to reverse a string without using library functions.
55) Create a program to find the GCD (Greatest Common Divisor) of two numbers.
56) Implement a program to find the square root of a number
57) Implement a program to check if a string is an anagram.
58) Create a program to print the ASCII value of a character.
59) Write a program to find the largest element in an array.
60) Implement a C program to check if a matrix is symmetric.
61) Create a program to find the sum of elements in the main diagonal of a matrix.
62) Write a C program to perform matrix multiplication
63) Implement a program to calculate the power of a number using recursion.
64) Write a program to find the second largest element in an array.
0 Comments