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.181Hard

What is printed by: char s[] = "hello"; printf("%zu", sizeof(s));?

Q.182Hard

What will be the result of: 5 % 2 * ?

Q.183Hard

In a struct, how is memory allocated for union members?

Q.184Medium

What is the output of: int a = 10, b = 20; int *p = &a, *q = &b; printf("%d", *p + *q);?

Q.185Easy

What is the correct way to declare a pointer to an integer?

Q.186Medium

What is the output of: int x = 5; int y = ++x; ?

Q.187Medium

What is the purpose of the free() function in C?

Q.188Medium

Which of the following correctly defines a structure in C?

Q.189Medium

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

Q.190Medium

Which loop construct will execute at least once even if the condition is false?

Q.191Medium

How is a two-dimensional array typically stored in memory in C?

Q.192Hard

What is the difference between #include <stdio.h> and #include "stdio.h"?

Q.193Hard

Consider the code: int *p; int arr[5]; p = arr; What does p[2] represent?

Q.194Hard

Which of the following will correctly allocate memory for an array of 10 integers?

Q.195Hard

What will be the output of: int x = 5; int y = x++ + ++x; ?

Q.196Easy

Which function is used to read a single character from standard input?

Q.197Easy

In the expression: int arr[3][3]; arr[1][2] = 5; What is being accessed?

Q.198Easy

What is the output of the following C code? int main() { int a = 10; printf("%d", a += 5); return 0; }

Q.199Medium

What is the output of the following code? int x = 5; int y = ++x; printf("%d %d", x, y);

Q.200Easy

What is the purpose of the strlen() function in C?