Skip to content

Some practice questions for learning C programming language

Notifications You must be signed in to change notification settings

uxrkhan/c-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Practice Questions

  1. Calculate Sum and Average of an Array

  2. Calculate the Sum of the Array Elements using Pointer

  3. Calculate Sum of all Elements of an Array using Pointers as Arguments

  4. Compute the Sum of two One-Dimensional Arrays using Malloc

  5. Find the Sum of Contiguous Subarray within a 1 – D Array of Numbers which has the Largest Sum              

  6. Find the Largest Two Numbers in a given Array

  7. Find the Second Largest & Smallest Elements in an Array

  8. Find the Largest Number in an Array

  9. Put Even & Odd Elements of an Array in 2 Separate Arrays

  10. Insert an Element in a Specified Position in a given Array

  11. Delete the Specified Integer from an Array

  12. Cyclically Permute the Elements of an Array

  13. Sort the Array in an Ascending Order

  14. Sort the Array in Descending Order

  15. Sort Names in an Alphabetical Order

  16. Merge and Sort Elements of 2 different Arrays

  17. Merge the Elements of 2 Sorted Array

  18. Sort N Numbers in Ascending Order using Bubble Sort

  19. Split an Array from Specified Position & Add First Part to the End

  20. Accept an Array & Swap Elements using Pointers

  21. Read an Array and Search for an Element

  22. accept Sorted Array and do Search using Binary Search

  23. find the Biggest Number in an Array of Numbers using Recursion

  24. Implement a Queue using an Array

  25. Implement two Stacks using a Single Array & Check for Overflow & Underflow

  26. Generate Pascal Triangle 1 D Array

  27. Print the Number of Odd & Even Numbers in an Array

  28. Print All the Repeated Numbers with Frequency in an Array

  29. Print the kth Element in the Array

  30. Find the Number of Elements in an Array

  31. Check Array bounds while Inputing Elements into the Array

  32. Print the Alternate Elements in an Array

  33. Find the Odd Element given an Array with only two Different Element

  34. Increment Every Element of the Array by One & Print Incremented Array

  35. Find the Number of Non Repeated Elements in an Array

  36. identify missing Numbers in a given Array

  37. Segregate 0s on Left Side & 1s on right side of the Array

  38. Find 2 Elements in the Array such that Difference between them is Largest

  39. Input a String & Store their Ascii Values in an Integer Array & Print the Array

  40. Input an Array, Store the Squares of these Elements in an Array & Print it

  41. Find the two Elements such that their Sum is Closest to Zero

  42. Find if a given Integer X appears more than N/2 times in a Sorted Array of N Integers

  43. Find the Median of the Elements after Merging these 2 Sorted Arrays with Same Size

  44. Find Union & Intersection of 2 Arrays

  45. Find Ceiling & Floor of X given a Sorted Array & a value X

  46. Find the Summation of Node values at Row or Level

  47. Calculate the Addition or Subtraction & Trace of 2 Matrices

  48. Find the Transpose of a given Matrix

  49. Compute the Product of Two Matrices

  50. Calculate the Sum & Difference of the Matrices

  51. Perform Matrix Multiplication using Recursion

  52. Check if 2 Matrices are Equal

  53. Check if a given Matrix is an Identity Matrix

  54. Determine if a given Matrix is a Sparse Matrix

  55. Interchange any two Rows & Columns in the given Matrix

  56. Sort Rows of the Matrix in Ascending & Columns in Descendng Order

  57. Calculate the Sum of the Elements of each Row & Column

  58. Find the Frequency of Odd & Even Numbers in the given Matrix

  59. Accept a Matrix of Order MxN & Interchange the Diagonals

  60. Find the Sum of each Row & each Column of a MxN Matrix

  61. do the Sum of the Main & Opposite Diagonal Elements of a MxN Matrix

  62. Find the Trace & Normal of a given Matrix

  63. Display Upper Triangular Matrix

  64. Display Lower Triangular Matrix

  65. Check if a given String is Palindrome

  66. Check if a String is a Palindrome without using the Built-in Function

  67. Check whether a given String is Palindrome or not using Recursion

  68. Program To Print Smallest and Biggest possible Word which is Palindrome in a given String

  69. Find the Largest & Smallest Word in a String

  70. read two Strings & Concatenate the Strings

  71. Concatenate two Strings Lexically

  72. Check if the Substring is present in the given String

  73. Accepts two Strings & Compare them

  74. Find the Length of a String without using the Built-in Function

  75. Replace Lowercase Characters by Uppercase & Vice-Versa

  76. Remove given Word from a String

  77. Remove all Characters in Second String which are present in First String

  78. Replace all the Characters by Lowercase

  79. Reverse the String using Recursion

  80. Reverse every Word of given String

  81. Count the Number of Vowels & Consonants in a Sentence

  82. Delete All Repeated Words in String

  83. Reverse the String using Both Recursion and Iteration

  84. Count the Total Number of Words in the Sentence using Command Line Argument

  85. Find the Frequency of the Word ‘the’ in a given Sentence

  86. Read a String and find the Sum of all Digits in the String

  87. Copy One String to Another using Recursion

  88. find the First Capital Letter in a String using Recursion

  89. find the First Capital Letter in a String without using Recursion

  90. find the Length of the String using Recursion

  91. find Longer Repeating Sequence

  92. Find the Frequency of Substring in the given String

  93. Find the Frequency of Every Word in a given String

  94. Find Highest Frequency Character in a String

  95. Find the Length of the Longest Repeating Sequence in a String

  96. find the possible subsets of the String

  97. Check whether two Strings are Anagrams

  98. Display every possible Combination of two Words or Strings from the input Strings without Repeated Combinations

  99. List All Lines containing a given String

  100. Print the Words Ending with Letter S

  101. Insert Character/Word in any Desired Location in a String

  102. Count the Number of Unique Words

  103. Search a Word & Replace it with the Specified Word

  104. Display the Characters in Prime Position a given String

  105. Count Number of Words in a given Text Or Sentence

  106. Print Combination of two Words of two given Strings without any Repetition

  107. Display Every Possible Combination of Two Words from the given 2 String without Displaying Repeated Combinations

  108. Accept 2 String & check whether all Characters in first String is Present in second String & Print

  109. Check whether a given Character is present in a String, Find Frequency & Position of Occurrence

  110. Count the Number of Occurrence of each Character Ignoring the Case of Alphabets & Display them

  111. Count the Occurrences of each C Keyword using Array Structure

  112. Find the First Occurence of the any Character of String2 in String1

  113. find First and Last Occurrence of given Character in a String

  114. Find the Most/Least Repeated Character in the String

  115. Count the Occurence of a Substring in String

  116. Determine if One String is a Circular Permutation of Another String

  117. Find the Consecutive Occurrence of any Vowel in a String

  118. Input 2 Binary Strings and Print their Binary Sum

  119. Input a String with at least one Number, Print the Square of all the Numbers in a String

  120. C Program which Converts an Integer to String & vice-versa

  121. C program that takes input as 2323 and gives output as 2332. ie. the new number should be greater than the previous number but should have the same digits

  122. Find the Sum of ASCII values of All Characters in a given String

About

Some practice questions for learning C programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages