0% found this document useful (0 votes)
3 views4 pages

C Beginner Practice Questions

The document contains 100 beginner-level C programming practice questions categorized into five sections: Input/Output + Variables, If-Else, Loops, Functions, Arrays, Strings, Pointers, and Structures. Each section includes various tasks such as printing messages, performing calculations, manipulating arrays, and using structures. These questions are designed to help beginners improve their programming skills in C.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

C Beginner Practice Questions

The document contains 100 beginner-level C programming practice questions categorized into five sections: Input/Output + Variables, If-Else, Loops, Functions, Arrays, Strings, Pointers, and Structures. Each section includes various tasks such as printing messages, performing calculations, manipulating arrays, and using structures. These questions are designed to help beginners improve their programming skills in C.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

100 Beginner-Level C Programming Practice Questions

Input/Output + Variables:

1. Print "Hello World"


2. Take two integers as input and print their sum
3. Take a float as input and print it
4. Print ASCII value of a character
5. Swap two numbers using a third variable
6. Swap two numbers without using third variable
7. Print size of int, float, char using sizeof()
8. Take radius as input, print area of circle
9. Convert Celsius to Fahrenheit
10. Simple interest calculator

If-Else:

11. Check if number is positive or negative


12. Check even or odd
13. Find max of 2 numbers
14. Find max of 3 numbers
15. Check if number is divisible by 5 and 11
16. Check if character is vowel or consonant
17. Check if number is a leap year
18. Simple calculator using if-else
19. Check if triangle is valid (angle sum = 180)
20. Grade calculator using marks

Loops:

21. Print numbers from 1 to N


22. Print even numbers up to N
23. Sum of first N numbers
24. Factorial of a number
25. Print multiplication table of a number
26. Count digits in a number
27. Reverse a number
28. Check if number is palindrome
29. Print all prime numbers between 1 to N
30. Check if a number is prime
31. Find GCD of two numbers
32. Find LCM of two numbers
33. Print Fibonacci series up to N terms
34. Print Armstrong numbers between 1 to 500
35. Count sum of digits of a number
36. Power of a number (a^b)
37. Sum of squares from 1 to N
38. Check if number is strong number
39. Find HCF of 3 numbers
40. Print pattern of stars (right angle triangle)

Functions:

41. Function to add 2 numbers


42. Function to check even or odd
43. Function to find factorial
44. Function to find nCr
45. Function to reverse a number
46. Function to check prime
47. Function to print Fibonacci
48. Function to convert Celsius to Fahrenheit
49. Function to find max of 3 numbers
50. Function to check leap year

Arrays:

51. Input and print elements of array


52. Find sum of elements
53. Find max element in array
54. Find min element
55. Reverse an array
56. Search an element (Linear search)
57. Count even and odd numbers
58. Find duplicate elements
59. Merge two arrays
60. Copy one array into another
61. Sort array (Bubble sort)
62. Find second largest element
63. Find frequency of each element
64. Count positive, negative, zero
65. Shift array left by 1
66. Shift array right by 1
67. Remove duplicate elements
68. Find sum of even elements
69. Count prime elements in array
70. Check if array is palindrome

Strings:

71. Input and print a string


72. Count length of string (without strlen)
73. Copy one string into another
74. Concatenate two strings
75. Reverse a string
76. Count vowels in string
77. Count words in a string
78. Convert string to uppercase
79. Check if string is palindrome
80. Compare two strings (strcmp)

Pointers:

81. Print address of a variable


82. Pointer to int - print value & address
83. Swap two numbers using pointers
84. Add two numbers using pointers
85. Pointer to array - print all elements
86. Pointer to string
87. Print array using pointer notation
88. Use pointer with function (pass by ref)
89. Return pointer from function
90. Double pointer concept (print value)

Structures:
91. Define and print structure for student
92. Structure to store employee info
93. Array of structures
94. Input and print book details using structure
95. Find student with highest marks
96. Pass structure to function
97. Return structure from function
98. Nesting of structures
99. Structure with array inside it
100. Structure with pointer as member

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy