InterviewSolution
Saved Bookmarks
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Consider the following C-program :int fun(){static int num = 16;return num--;}int main(){for(fun(); fun(); fun())printf("%d ", fun());return 0;}What is output of above program?(A) Infinite loop(B) 13 10 7 4 1(C) 15 12 8 5 2(D) 14 11 8 5 2 |
| Answer» | |
| 2. |
Which of the following statement(s) is/are correct?1 is the remainder when 7^700 is divided by 100.1 is the remainder when 7^26 is divided by 100.2 is the remainder when 7^35 is divided by 13.(A) Only (1)(B) Only (2)(C) Only (1) and (3)(D) All (1), (2), and (3) |
| Answer» | |
| 3. |
The long, anxious, and frustrating wait by people outside banks and ATMs across the country over the last five days is an inevitable consequence of the decision to demonetize notes of Rs.500 and Rs.1,000. When 86 per cent of the value of notes in circulation turns suddenly invalid, as it did with Prime Minister Modi’s ‘surgical strike’ last week, a certain degree of disruption and pain is unavoidable. But the question is whether this chaos could have been anticipated and managed better than it has been.Replacement of the demonetized notes is a time-consuming exercise that requires planning of the highest order. The experience of the last few days shows that preparation was lacking and the transition could have been handled much better.Thankfully, the Centre has woken up to ease the pressure on the system by increasing withdrawal limits, allowing for petroleum outlets and hospitals to accept the old series of notes until November 24 and pushing more cash through post offices.Why do you think that the replacement of the demonetized notes is a time-consuming exercise?(A) It takes more than 50 days to replace demonized notes.(B) Demonetization is a ‘futile exercise’ to target black money and fake currency(C) The government was lazy enough to issue the decision of demonetization before.(D) Replacement process requires planning of the highest order and careful implementation. |
| Answer» | |
| 4. |
Study the given graphs to answer these questions.The total production of wheat is 50 lakh tonnes.Production of wheat in different states of India is given :Abbreviations :U.P. = Uttar Pradesh,M.P. = Madhya Pradesh,A.P. = Andhra Pradesh,C.G. = ChhattisGarh.What is the ratio of production by conventional method in A.P. to that by scientific method in U.P.?(A) 484/949(B) 99/260(C) 51/260(D) 48/77 |
| Answer» | |
| 5. |
The long, anxious, and frustrating wait by people outside banks and ATMs across the country over the last five days is an inevitable consequence of the decision to demonetize notes of Rs.500 and Rs.1,000. When 86 per cent of the value of notes in circulation turns suddenly invalid, as it did with Prime Minister Modi’s ‘surgical strike’ last week, a certain degree of disruption and pain is unavoidable. But the question is whether this chaos could have been anticipated and managed better than it has been.Replacement of the demonetized notes is a time-consuming exercise that requires planning of the highest order. The experience of the last few days shows that preparation was lacking and the transition could have been handled much better.Thankfully, the Centre has woken up to ease the pressure on the system by increasing withdrawal limits, allowing for petroleum outlets and hospitals to accept the old series of notes until November 24 and pushing more cash through post offices.Which of the following option is false ?(A) ‘Unconcerned’ is similar in meaning to the word ‘anxious’ as used in the passage.(B) ‘Disorder’ is similar in meaning to the word ‘chaos’ as used in the passage.(C) ‘Hardship’ is opposite in meaning to the word ‘ease’ as used in the passage.(D) ‘Shift’ is opposite in meaning to the word ‘transition’as used in the passage. |
| Answer» | |
| 6. |
The expression [ (x + y) + |x – y| ] / 2 is equal to __________ .(A) the maximum of x and y(B) the minimum of x and y(C) 1(D) none of the above |
| Answer» | |
| 7. |
Consider the following instruction sequence in a RISC machine :Conditional and unconditional branch instructions use PC- relative addressing mode with Offset specified in bytes to the target location of the branch instruction. Further the Offset is always with respect to the address of the next instruction in the program sequence. If the target of the branch instruction is i, then the decimal value of the Offest is __________.(A) -16(B) 18(C) 1000(D) None of the above |
| Answer» None | |
| 8. |
Consider an array A[999] & each element occupies 4 word. A 32 word cache is used and divided into 16 word blocks. What is the miss ratio for the following statement. Assume one block is read into cache in case of miss:for(i=0; i < 1000; i++) A[i] = A[i] + 99(A) 0.50(B) 0.75(C) 0.875(D) 0.125 |
| Answer» | |
| 9. |
A cache memory unit with capacity of N words and block size of B words is to be designed. If it is designed as a 16-way set-associative cache, the length of the TAG field is 10 bits. If the cache unit is now designed as direct mapped cache, the length of the TAG field is ______ bits.(A) 6(B) 14(C) 16(D) None of these |
| Answer» | |
| 10. |
The units digit of (35)87 + (93)46 is:(A) 4(B) 2(C) 6(D) None of these |
| Answer» | |
| 11. |
What is the probability of 3 students sharing a birthday in a class of 30 students is ________ .(A) 0.0300(B) 0.7029(C) 0.5604(D) None of the above |
| Answer» | |
| 12. |
What is the radix of the number if the solution to quadratic equation x^2 − 10x + 31 = 0 is x = 5 and x = 8?(A) 10(B) 8(C) 5(D) 13 |
| Answer» | |
| 13. |
What is the number of solutions for the inequality- where are integers greater than 0?(A) 182(B) 364(C) 78(D) 440 |
| Answer» | |
| 14. |
Read each sentence to find out whether there is any grammatical error in it. The error, if any will be in one part of the sentence. Choose the part of the sentence that has an error in it, if there is no error select ‘D’.(A) An Indian ship(B) laden with merchandise(C) got drowned in the Pacific Ocean.(D) No error. |
| Answer» | |
| 15. |
Consider the following C – code :#include "stdio.h"int foo(int a){printf("%d",a);return 0;}int main(){foo;return 0;}Which of the following option is correct?(A) It’ll result in compile error because foo is used without parentheses.(B) No compile error and some garbage value would be passed to foo function. This would make foo to be executed with output “garbage integer”.(C) No compile error but foo function wouldn’t be executed. The program wouldn’t print anything.(D) No compile error and ZERO (i.e. 0) would be passed to foo function. This would make foo to be executed with output 0. |
| Answer» | |
| 16. |
The probability that the top and bottom cards of a randomly shuffled deck are both aces is –A. B. C. D. (A) A(B) B(C) C(D) D |
| Answer» | |
| 17. |
For the workshops organized in college, students can participate more than one workshop saying that all are organized in different timings. 150 students are enrolled in total for one or more than one workshop. Registration details are as follows :99 students are enrolled for Cyber Security. 56 students are enrolled for Solar Energy, 89 students are enrolled for Artificial Intelligence. 25 students for both Cyber Security and Solar Energy. 65 students for both Cyber Security and Artificial Intelligence and 18 students for both Solar Energy and Artificial Intelligence. How many students are participating in all three workshops ?(A) 12(B) 16(C) 10(D) 14 |
| Answer» | |
| 18. |
Choose the most closely related word for ‘Paradox’(A) Certitude(B) Enigma(C) Explanation(D) Derivative |
| Answer» | |
| 19. |
There was a man on the news last night who reckons we ——– visited by beings from other worlds.(A) were(B) have been(C) had been(D) had |
| Answer» | |
| 20. |
What’s going to happen when we compile and run the following C program snippet?#include "stdio.h"int main(){int a = 10;int b = 15;printf("=%d",(a+1),(b=a+2));printf(" %d=",b);return 0;}(A) =11 15=(B) =11 12=(C) Compiler Error due to (b=a+2) in the first printf().(D) No compile error but output would be =11 X= where X would depend on compiler implementation. |
| Answer» | |
| 21. |
Consider following two C – program :P1 :int main(){int (*ptr)(int ) = fun;(*ptr)(3);return 0;}int fun(int n){for(;n > 0; n--)printf("GeeksQuiz ");return 0;}P2 :int main(){void demo();void (*fun)();fun = demo;(*fun)();fun();return 0;}void demo(){printf("GeeksQuiz ");}Which of the following option is correct?(A) P1 printed “GeeksQuiz GeeksQuiz” and P2 printed “GeeksQuiz GeeksQuiz”(B) P1 printed “GeeksQuiz GeeksQuiz” and P2 gives compiler error(C) P1 gives compiler error and P2 printed “GeeksQuiz GeeksQuiz”(D) None of the above |
| Answer» None | |
| 22. |
What is output of following C – Code?#include <stdio.h>#include <stdarg.h>int fun(int n, ...){int i, j = 1, val = 0;va_list p;va_start(p, n);for (; j < n; ++j){i = va_arg(p, int);val += i;}va_end(p);return val;}int main(){printf("%d\n", fun(4, 1, 2, 3));return 0;}(A) 3(B) 5(C) 6(D) 10 |
| Answer» | |
| 23. |
Choose the best statement with respect to following three program snippets./*Program Snippet 1 with for loop*/for (i = 0; i < 10; i++){/*statement1*/continue;/*statement2*/}/*Program Snippet 2 with while loop*/i = 0;while (i < 10){/*statement1*/continue;/*statement2*/i++;}/*Program Snippet 3 with do-while loop*/i = 0;do{/*statement1*/continue;/*statement2*/i++;}while (i < 10);(A) All the loops are equivalent i.e. any of the three can be chosen and they all will perform exactly same.(B) continue can’t be used with all the three loops in C.(C) After hitting the continue; statement in all the loops, the next expression to be executed would be controlling expression (i.e. i < 10) in all the 3 loops.(D) None of the above is correct. |
| Answer» | |
| 24. |
Consider 4-way set-associative cache memory has the following properties:Data words are 32 bits eachA cache block will contain 2048 bits of dataThe address supplied from the CPU is 32 bits longThere are 2048 blocks in the cacheAddresses are to the wordNumber of bits in tag?(A) 17(B) 15(C) 16(D) None of the above |
| Answer» | |
| 25. |
Recall that Belady’s anomaly is that the pages-fault rate may increase as the number of allocated frames increases and also recall convey effect where first process can increase waiting time for all processes. Now consider the following statements:S1 : Random page replacement algorithm (where a page chosen at random is replaced) suffers from Belady’s anomaly.S2 : Random CPU scheduling algorithm suffers from convoy effect.Which of the following is CORRECT?(A) S1 is true, S2 is true(B) S1 is true, S2 is false(C) S1 is false , S2 is true(D) S1 is false, S2 is false |
| Answer» | |
| 26. |
Consider the following grammars(S1) :A --> aBCDB --> bc|cC --> d|∈D -> b(S2) :A --> aBCDB --> bc|∈C --> d|cD -> b(S3) :A --> aBCDB --> bc|∈C --> d|∈D -> b(S4) :A --> aBCDB --> bc|cC --> d|cD -> bWhich of the following grammar has same follow set for variable B?(A) Only (S1), (S2) and (S3), (S4)(B) Only (S1), (S3) and (S2), (S4)(C) Only (S2), (S3) and (S1), (S4)(D) None of the above |
| Answer» None | |
| 27. |
I haven’t worked as a mechanic before, ________ I’ve been fixing cars since I was a child.(A) always(B) yet(C) no longer(D) already |
| Answer» | |
| 28. |
____________ is usually used for something that was done in the past and still applies (multiple events).(A) Had/has/have been(B) Was/were(C) Had/was/were(D) All of the above |
| Answer» | |
| 29. |
A dice is thrown. Let A be the event that the number obtained is greater than 5. Let B be the event that the number obtained is less than 5. Then P (AUB) is(A) 5/6(B) 2/6(C) 3/6(D) None of these |
| Answer» | |
| 30. |
Ram is smarter than Mohan. Rakesh is smarter than Ramu and Mohini is smarter than Rakesh. Which of the following is a set(s) of additional information that can determine the smartest person?(I) Mohini is smarter than Ram and Mohan is smarter than Rakesh.(II) Mohan is smarter than Mohini.(III) Ram is smarter than Mohini.(A) Only (II)(B) Only (III)(C) Either (I) or (II)(D) None of these |
| Answer» | |
| 31. |
Given A, an array of size n, comprised of an increasing sequence of numbers followed immediately by a decreasing one. What is worst case time complexity of optimal algorithm to determine if a given number x is in the array?(A) Θ(log n)(B) Θ(n)(C) Θ(n^2)(D) Θ(log n)^2 |
| Answer» | |