iGET

Computer Knowledge - MCQ Practice Questions

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

309 questions | 100% Free

Q.161Easy

Which loop construct in C guarantees execution at least once?

Q.162Easy

What is the scope of a variable declared inside a block?

Q.163Medium

How many times will the following loop execute: for(int i=0; i<5; i++) { if(i==3) break; }

Q.164Medium

Which of the following is a correct way to initialize a pointer to NULL?

Q.165Easy

What will be the value of x after executing: int x = 5; x += 3; x *= 2;

Q.166Hard

Which of the following correctly describes the relationship between arrays and pointers in C?

Q.167Medium

What is the output of the expression: * 3 in C?

Q.168Easy

Which preprocessor directive is used to include a custom header file?

Q.169Hard

What is the difference between a function declaration and a function definition in C?

Q.170Hard

Which of the following is the correct way to declare a pointer to a function that returns an int and takes two int parameters?

Q.171Easy

Which of the following is NOT a valid variable name in C?

Q.172Easy

What will be the output of: printf("%d", 5 + 3 * 2);?

Q.173Easy

What keyword is used to create a pointer variable in C?

Q.174Medium

What is the correct syntax to pass a 2D array to a function in C?

Q.175Medium

What will be printed by: int x = 5; printf("%d", ++x + x++);?

Q.176Medium

Which of the following correctly uses the ternary operator?

Q.177Medium

What is the purpose of the const keyword when used with a pointer?

Q.178Medium

What is the return type of malloc() function?

Q.179Medium

In the expression: int arr[10]; what is arr[5]?

Q.180Hard

Consider: int *p, q; What is the type of q?