iGET

Computer Knowledge - MCQ Practice Questions

Computer Science questions in competitive exams stay close to fundamentals, which is good news if you revise the right five subjects. Coverage includes data structures, algorithms and complexity, operating systems, database management systems, computer networks, and computer organisation. Explanations show the trace or the state table where one helps, since seeing the intermediate steps is what makes the concept stick.

304 questions | 100% Free

Q.101Medium

What is the difference between calloc() and malloc()?

Q.102Medium

Which of the following is used to comment multiple lines in C?

Q.103Medium

What will be the output of: float x = ; printf("%f", x);

Q.104Medium

How are structures different from unions in C?

Q.105Hard

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

Q.106Hard

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

Q.107Hard

What is the difference between declaration and definition in C?

Q.108Medium

What will be the output of the following code?
int a = 5;
int b = ++a + a++;
printf("%d", b);

Q.109Easy

What is the size of an empty structure in C?

Q.110Easy

What will be the output of: char *s = "Hello"; printf("%d", strlen(s));

Q.111Medium

What will be the output of: int x = 5; printf("%d", x << 1);

Q.112Medium

Consider the code: int arr[10]; int *p = arr; What is p[5]?

Q.113Medium

What is the purpose of the void pointer in C?

Q.114Easy

What will be the output of: #define MAX 10; int x = MAX; printf("%d", x);

Q.115Medium

Which function is used to read a string from standard input?

Q.116Medium

What is the output of: int arr[] = {1,2,3,4,5}; printf("%d", sizeof(arr)/sizeof(arr[0]));

Q.117Easy

Which of the following correctly initializes a 2D array?

Q.118Easy

What will be the output of: printf("%d", );

Q.119Easy

What does the getchar() function do?

Q.120Easy

What will be the output of: int a = 5, b = 5; if(a == b) printf("Equal"); else printf("Not Equal");