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

In C, when passing arrays to functions, what is actually passed?

Q.22Hard

What will be the output of: int a = 5; int *p = &a; printf("%d %d", a, *p);?

Q.23Hard

What does the static keyword do when used with a global variable?

Q.24Hard

Consider: int arr[10]; int *p = arr; What is p[5] equivalent to?

Q.25Hard

What is the difference between declaration and definition in C?

Q.26Hard

What will be the output of: int x = 10; int y = x++ + ++x; printf("%d", y);

Q.27Hard

Consider a complex expression: int x = 2 + 3 * 4 - ; What is x?

Q.28Hard

What happens if you declare a variable but don't initialize it in C?

Q.29Hard

Consider: int *ptr = NULL; *ptr = 5; What will happen?

Q.30Hard

What does the 'volatile' keyword indicate in C?

Q.31Hard

Consider: int *ptr; int arr[] = {1,2,3}; ptr = arr; What is ptr[1]?

Q.32Hard

What is the difference between getchar() and scanf("%c", &ch); in C?

Q.33Hard

What will be the output: int a = 2, b = 3; printf("%d", a * b + a / b);

Q.34Hard

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

Q.35Hard

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

Q.36Hard

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

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

Q.38Hard

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

Q.39Hard

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

Q.40Hard

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