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

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

Q.102Medium

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

Q.103Medium

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

Q.104Medium

What is the purpose of the void pointer in C?

Q.105Easy

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

Q.106Medium

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

Q.107Medium

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

Q.108Easy

Which of the following correctly initializes a 2D array?

Q.109Easy

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

Q.110Easy

What does the getchar() function do?

Q.111Easy

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

Q.112Medium

What will be the output of: char c = 'A'; printf("%d", c);

Q.113Easy

Which header file is essential for using the printf() function in C?

Q.114Medium

What is the output of: int arr[5]; printf("%d", sizeof(arr));

Q.115Medium

Which function is used to allocate memory dynamically at runtime?

Q.116Medium

What is the purpose of the break statement in a switch case?

Q.117Medium

What will be the output of: int x = 5, y = 10; if (x < y) printf("yes"); else printf("no");

Q.118Medium

Which of the following is NOT a valid way to pass arguments to a function in C?

Q.119Medium

What will be the result of: int a = 10, b = 3; int c = a % b; printf("%d", c);

Q.120Hard

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