C MCQs - 13
What will be the output of the following code snippet? #include <stdio.h> int main() { int arr[] = {1, 2, 3, 4, 5}; ...
What will be the output of the following code snippet? #include <stdio.h> int main() { int arr[] = {1, 2, 3, 4, 5}; ...
What will be the output of the following code snippet? #include <stdio.h> int main() { int x = 5; prin...
What is the time complexity of the bubble sort algorithm used in the provided code? a) O(n) b) O(n log n) c) O(n^2) d) O(lo...
What will be the output of the following code snippet? #include <stdio.h> int main() { int i = 0; for...
What will be the output of the following code snippet? #include <stdio.h> int main() { int x = 0; whi...
What will be the output of the following code snippet? #include <stdio.h> int main() { int i = 0; for...
What is the output of the following code? #include <stdio.h> int main() { int arr[] = {1, 2, 3, 4, 5};  ...
Which of the following is true regarding the sizeof operator in C? a) It is a preprocessor directive b) It returns the size of a variable ...
Which statement is used to dynamically allocate memory for an array in C? a) new b) malloc c) allocate d) array_alloc Answer: b) m...
What does the fprintf() function do in C? a) Reads formatted data from a file b) Writes formatted data to a file c) Reads formatted data...
What will be the output of the following code? #include <stdio.h> int main() { int x = 5; int y = 10;...
What is the output of the following code snippet? int i = 5; printf("%d\n", ++i); a) 5 b) 6 c) Undefined behavior d) Comp...
What does the sizeof operator return in C? a) Size of a variable in bytes b) Size of a datatype in bytes c) Size of a pointer in bytes ...
C Interview Questions and Answers is used to prepared for company jobs....
In C programming language, an enumeration is a user-defined data type that consists of a set of named constants, also known as enumerators....
In C programming language, a structure is a composite data type that groups together related data items of different data types under a single name. Structures are defined using the struct keyword, which defines a new type that can be used to declare variables of that type....
File handling is an important aspect of programming, allowing programs to read from and write to files on a computer's file system....
C programming language provides several built-in math functions in the math.h library that perform various mathematical operations. These functions can be useful in many different types of programs, such as scientific, engineering, and financial applications. ...
Recursion is a powerful technique in programming that involves a function calling itself. In C programming language, a recursive function is a function that calls itself either directly or indirectly to solve a problem....
In C programming language, a function is a block of code that performs a specific task and can be called from other parts of the program....