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

In C, when you declare an array like int arr[10], what does the array name 'arr' represent?

Q.142Easy

What is the size of the string 'Hello' when stored in a character array with null terminator?

Q.143Easy

Which of the following correctly initializes a 2D array of integers?

Q.144Easy

In the declaration char *str[5], what does the array represent?

Q.145Easy

How many elements can be stored in a 2D array declared as int matrix[4][5]?

Q.146Easy

What is the correct way to declare and initialize a string in C?

Q.147Easy

What is the output of: int arr[] = {10, 20, 30}; printf("%d", *(arr+1));?

Q.148Easy

What will be the size in bytes of int arr[5] on a 32-bit system?

Q.149Easy

Consider the following code: char str[] = "HELLO"; int len = 0; while(str[len] != '\0') { len++; } printf("%d", len); What will be the output?

Q.150Easy

Which operator is used to get the address of a variable in C?

Q.151Easy

What will be the size of a pointer variable on a 64-bit system?

Q.152Easy

What is a NULL pointer?

Q.153Easy

Which of the following is NOT a valid pointer declaration?

Q.154Easy

Identify the output: char *str = "Hello"; printf("%c", *str);

Q.155Easy

A pointer variable stores the _____ of another variable.

Q.156Easy

What is the size of a pointer variable on a 32-bit system?

Q.157Easy

Consider: int x = 10; int *p = &x; What does the expression *p represent?

Q.158Easy

Which operator is used to get the address of a variable?

Q.159Easy

What will be printed by the code: char *ptr = "Hello"; printf("%c", *ptr);

Q.160Easy

What is the size of a pointer variable in a 64-bit system?