iGET

C Programming - MCQ Practice Questions

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

972 questions | 100% Free

Q.401Easy

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

Q.402Medium

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

Q.403Medium

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

Q.404Medium

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

Q.405Easy

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

Q.406Medium

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

Q.407Medium

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

Q.408Medium

Which string function modifies the original string in-place?

Q.409Hard

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

Q.410Hard

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

Q.411Hard

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

Q.412Hard

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

Q.413Medium

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

Q.414Hard

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

Q.415Hard

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

Q.416Medium

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

Q.417Easy

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

Q.418Easy

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

Q.419Easy

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

Q.420Easy

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