iGET

C Programming - MCQ Practice Questions

Practice free C Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

978 questions | 100% Free

Q.1Easy

What is the correct way to declare a 1D array of 10 integers in C?

Q.2Easy

What will be the output of strlen("Hello") in C?

Q.3Easy

Which of the following is NOT a valid string initialization?

Q.4Easy

What does the following code do? strcpy(dest, src);

Q.5Easy

Consider a 2D array declared as: int matrix[3][4]. How many elements does it have?

Q.6Easy

If an integer array arr[10] is declared globally in C, what will be the initial values of its elements?

Q.7Easy

In C, a string is internally represented as:

Q.8Easy

How much memory is allocated for char name[50] declaration?

Q.9Easy

What is the time complexity of accessing an element at index 5 in an array?

Q.10Easy

What does strlen() function return for the string "C2025"?

Q.11Easy

What will be the output of the following code? int arr[] = {1, 2, 3, 4, 5}; printf("%d", *(arr + 3));

Q.12Easy

Which of the following correctly declares a 2D array of strings?

Q.13Easy

What is the output of strlen("Hello") in C?

Q.14Easy

How many bytes are allocated by: int arr[10][20];?

Q.15Easy

What will be printed? char *str = "Hello"; printf("%c", str[1]);

Q.16Easy

Predict the output: int arr[3][3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; printf("%d", arr[1][2]);

Q.17Easy

What is the output? int arr[] = {10, 20, 30, 40}; int *p = arr; printf("%d", p[2]);

Q.18Easy

What is the maximum size of a string that can be stored in char str[50]?

Q.19Easy

Which function is used to find the length of a string in C?

Q.20Easy

How many bytes does a 2D array int arr[3][4] occupy in memory?