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.401Easy

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

Q.402Easy

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

Q.403Medium

Which of the following correctly declares and initializes a 2D array?

Q.404Medium

What is the relationship between array name and pointer in C?

Q.405Medium

If str = "Hello", what is the value of str[5]?

Q.406Easy

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

Q.407Medium

In a 2D array int matrix[4][5], which statement about memory layout is true?

Q.408Medium

What is the output of sizeof(arr)/sizeof(arr[0]) when arr is declared as int arr[10]?

Q.409Medium

Which string function modifies the original string in-place?

Q.410Hard

Consider: int arr[3][4][5]. What is the size of arr[0][0]?

Q.411Hard

Which of the following is true about strcpy(dest, src)?

Q.412Hard

What is the main difference between char arr[] = "Test" and char *ptr = "Test"?

Q.413Hard

If ptr is a pointer to int array and ptr = arr, what does ptr[3] represent?

Q.414Medium

What happens when you try to modify a string literal in C?

Q.415Hard

What is the correct way to safely copy strings in modern C?

Q.416Hard

In the declaration int *arr[10], what is arr?

Q.417Medium

What is the time complexity of inserting an element at the beginning of an unsorted array?

Q.418Easy

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

Q.419Easy

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

Q.420Easy

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