

MCQOPTIONS
Saved Bookmarks
This section includes 1917 Mcqs, each offering curated multiple-choice questions to sharpen your UGC-NET knowledge and support exam preparation. Choose a topic below to get started.
1. |
Consider the method mcq ( ).IfM1 = Number of tests to exhaustively test mcq ( );M2 = Minimum number of tests to achieve full statement coverage for mcq ( ); andM3 = Minimum number of tests to achieve full branch coverage for mcq ( );then (M1, M2, M3) = .................... |
A. | (16, 3, 5) |
B. | (8, 5, 3) |
C. | (8, 3, 5) |
D. | (16, 4, 4) |
Answer» B. (8, 5, 3) | |
2. |
Consider the following two C++ programs P1 and P2 and two statements S1 and S2 about these programs:S1: P1 prints out 3.S2: P2 prints out 4:2What can you say about the statements S1 and S2? |
A. | Only S1 is true |
B. | Only S2 is true |
C. | Both S1 and S2 are true |
D. | Neither S1 nor S2 is true |
Answer» B. Only S2 is true | |
3. |
The output generated by the following C program does not include the value: |
A. | 5 |
B. | 6 |
C. | 8 |
D. | 16 |
Answer» C. 8 | |
4. |
Consider the following pseudo-code fragment, where m is a non-negative integer that has been initialized.Which of the following is a loop invariant for the while statement?(Note: a loop invariant for a while statement is an assertion that is true each time the guard is evaluated during the execution of the while statement). |
A. | p = 2^k − 1 and 0≤k<m |
B. | p = 2^(k+1) − 1 and 0≤k<m |
C. | p = 2^k − 1 and 0≤k≤m |
D. | p = 2^(k+1) − 1 and 0≤k≤m |
Answer» D. p = 2^(k+1) − 1 and 0≤k≤m | |
5. |
What is the output of the following ‘C’ program? (Assuming little - endian representation of multi-byte data in which Least Significant Byte (LSB) is stored at the lowest memory address.) |
A. | 5, 2, 1282 |
B. | 5, 2, 52 |
C. | 5, 2, 25 |
D. | 5, 2, 517 |
Answer» E. | |
6. |
What would be the output of the following C program. |
A. | Good Morning |
B. | Good Morning infinite times |
C. | Blank Display |
D. | Syntax Error |
Answer» D. Syntax Error | |
7. |
Given below are three implementations of the swap( ) function in C++ .Which of these would actually swap the contents of the two integer variables p and q? |
A. | (a) only |
B. | (b) only |
C. | (c) only |
D. | (b) and (c) only |
Answer» C. (c) only | |
8. |
What would be the output of the following C program |
A. | 1 1 2 3 5 |
B. | 1 1 1 1 1 |
C. | 1 1 0 0 0 |
D. | Syntax Error |
Answer» E. | |
9. |
The output generated by the following C program: |
A. | *pv=0 v=0 |
B. | *pv=0 v=3 |
C. | *pv=3 v=3 |
D. | *pv=3 v=0 |
Answer» B. *pv=0 v=3 | |
10. |
The output generated by the following C program |
A. | 10 11 12 |
B. | 10 11 13 |
C. | 0 1 3 |
D. | Compilation Error |
Answer» C. 0 1 3 | |
11. |
In C++, the following statements causes: |
A. | p-a dangling reference |
B. | q-a dangling reference |
C. | Both p and q as dangling references |
D. | None of these |
Answer» D. None of these | |
12. |
A member function can always access the data in ................ , (in C++). |
A. | the class of which it is member |
B. | the object of which it is a member |
C. | the public part of its class |
D. | the private part of its class |
Answer» B. the object of which it is a member | |
13. |
What is the output of the following C program: main(){ printf(“%d%d%d”, sizeof(3.14f), sizeof(3.14), sizeof(3.141)); } |
A. | 4 4 4 |
B. | 4 8 8 |
C. | 8 4 8 |
D. | 8 8 8 |
Answer» C. 8 4 8 | |
14. |
int arr[ ] = {1, 2, 3, 4}int count;incr( ) {return ++count;}main( ){arr[count++]=incr( );printf(“arr[count]=%d\n”, arr[count]);}The value printed by the above program is: |
A. | 1 |
B. | 2 |
C. | 3 |
D. | 4 |
Answer» C. 3 | |
15. |
Find the output of the following “C” code:Main ( ){ int x = 20, y = 35;x = y++ + x++;y = ++y + ++x;printf (“%d, %d\n”, x, y);} |
A. | 55, 93 |
B. | 53, 97 |
C. | 56, 95 |
D. | 57, 94 |
Answer» E. | |
16. |
Main(){ char *str=”abcde”;printf(“%c”, *str);printf(“%c”, *str++);printf(“%c”, *(str++));printf(“%s”, str);}The output of the above ‘C’ code will be: |
A. | a a c b c d e |
B. | a a c c c d e |
C. | a a b c d e |
D. | None of these |
Answer» D. None of these | |
17. |
If a variable is declared as register type, then the operator that cannot be applied to it. |
A. | Unary & |
B. | Unary - |
C. | Binary & |
D. | Binary - |
Answer» B. Unary - | |
18. |
The data hiding is taken care by: |
A. | Abstraction |
B. | Encapsulation |
C. | Modularity |
D. | Inheritance |
Answer» B. Encapsulation | |
19. |
What keyword in class specification helps to hide data: |
A. | Public |
B. | Private |
C. | Static |
D. | Void |
Answer» C. Static | |
20. |
Consider the graph shown below. Use Kruskal’s algorithm to find the minimum spanning tree of the graph. The weight of this minimum spanning tree is |
A. | 17 |
B. | 16 |
C. | 14 |
D. | 13 |
Answer» C. 14 | |
21. |
Function overloading done at: |
A. | Run time |
B. | Compile time |
C. | Linking time |
D. | Switching from function to function |
Answer» C. Linking time | |
22. |
Consider the following statements,int i=4, j=3, k=0;k=++i - --j + i++ - --j +j++; What will be the values of i, j and k after the statement. |
A. | 7, 2, 8 |
B. | 5, 2, 10 |
C. | 6, 2, 8 |
D. | 4, 2, 8 |
Answer» D. 4, 2, 8 | |
23. |
The hexadecimal equivalent of the binary integer number 110101101 is: |
A. | D 2 4 |
B. | 1 B D |
C. | 1 A E |
D. | 1 A D |
Answer» E. | |
24. |
What does the following logic diagram represent? |
A. | Synchronous Counter |
B. | Ripple Counter |
C. | Combinational Circuit |
D. | Mod 2 Counter |
Answer» C. Combinational Circuit | |
25. |
Find the Boolean expression for the logic circuit shown below:(1-NAND gate, 2-NOR gate, 3-NOR gate) |
A. | AB’ |
B. | A’B |
C. | AB |
D. | A’B’ |
Answer» D. A’B’ | |
26. |
CMOS is a Computer Chip on the motherboard, which is: |
A. | RAM |
B. | ROM |
C. | EPROM |
D. | Auxillary storage |
Answer» B. ROM | |
27. |
Simplify the following using K-map:F (A, B, C, D) = Σ (0, 1, 2, 8, 9, 12, 13)d (A, B, C, D) = Σ (10, 11, 14, 15)d stands for don’t care condition. |
A. | A+B’ D’ + BC |
B. | A+B’ D’ + B’ C’ |
C. | A’+B’ C’ |
D. | A’+B’ C’+B’ D’ |
Answer» C. A’+B’ C’ | |
28. |
Consider the following circuit. To make it a Tautology the [?] should be: |
A. | NAND gate |
B. | AND gate |
C. | OR gate |
D. | EX-OR gate |
Answer» B. AND gate | |
29. |
IC 74 LS 138 is a: |
A. | NOR gate |
B. | Decoder |
C. | Latch |
D. | Tri-state Buffer |
Answer» C. Latch | |
30. |
Identify the logic function performed by the circuit shown |
A. | Exclusive-OR |
B. | AND |
C. | Exclusive-NOR |
D. | NOR |
Answer» D. NOR | |
31. |
Identify the logic function performed by the circuit shown |
A. | exclusive OR |
B. | exclusive NOR |
C. | NAND |
D. | NOR |
Answer» C. NAND | |
32. |
Consider the following sequence of instructions:a=a⊕b, b=a⊕b, a=b⊕a. This sequence |
A. | retains the value of the a and b |
B. | complements the value of a and b |
C. | swap a and b |
D. | negates values of a and b |
Answer» D. negates values of a and b | |
33. |
Which of the following logic has the maximum fan out ? |
A. | RTL |
B. | ECL |
C. | NMOS |
D. | CMOS |
Answer» E. | |
34. |
The Register or main memory location which contains the effective address of the operand is known as: |
A. | Pointer |
B. | Indexed register |
C. | Special Locations |
D. | Scratch pad |
Answer» B. Indexed register | |
35. |
A half-adder is also known as : |
A. | AND Circuit |
B. | NAND Circuit |
C. | NOR Circuit |
D. | EX-OR Circuit |
Answer» E. | |
36. |
When a tri-state logic device is in the third state, then: |
A. | it draws low current |
B. | it does not draw any current |
C. | it draws very high current |
D. | it presents a low impedance |
Answer» E. | |
37. |
Amongst the logic families DTL, TTL, ECL and CMOS, the family with the least power dissipation is: |
A. | CMOS |
B. | DTL |
C. | TTL |
D. | ECL |
Answer» B. DTL | |
38. |
Consider the following statements:(i) Auto increment addressing mode is useful in creating self-relocating code.(ii) If auto increment addressing mode is included in an instruction set architecture, then an additional ALU is required for effective address calculation.(iii) In auto incrementing addressing mode, the amount of increment depends on the size of the data item accessed.Which of the above statements is/are true? |
A. | (i) and (ii) only |
B. | (ii) and (iii) only |
C. | (iii) only |
D. | (ii) only |
Answer» E. | |
39. |
Which of the following mapping is not used for mapping process in cache memory? |
A. | Associative mapping |
B. | Direct mapping |
C. | Set-Associative mapping |
D. | Segmented - page mapping |
Answer» E. | |
40. |
Consider the following x86 – assembly language instructions:MOV AL, 153NEG ALThe contents of the destination register AL (in 8-bit binary notation), the status of Carry Flag (CF) and Sign Flag (SF) after the execution of above instructions, are |
A. | AL = 0110 0110; CF = 0;SF = 0 |
B. | AL = 0110 0111; CF = 0;SF = 1 |
C. | AL = 0110 0110; CF = 1;SF = 1 |
D. | AL = 0110 0111; CF = 1;SF = 0 |
Answer» E. | |
41. |
What is the result of count(//*) for the following XML document? |
A. | 3 |
B. | 4 |
C. | 5 |
D. | 6 |
Answer» C. 5 | |
42. |
Which of the following has a valid node value attribute? |
A. | Element |
B. | Attr |
C. | Entity |
D. | Document |
Answer» C. Entity | |
43. |
Which of the following can be verified with DTD? |
A. | Control |
B. | data |
C. | description |
D. | None of these |
Answer» C. description | |
44. |
In X path, the descendant – or – self axis contains |
A. | Descendants of the context node |
B. | All the nodes after the context node |
C. | The context node and the descendants of the context node |
D. | All siblings after the context node |
Answer» D. All siblings after the context node | |
45. |
Which of the following tags is used to create table headers? |
A. | <insert header> |
B. | <header> |
C. | <head> |
D. | <th> |
Answer» E. | |
46. |
Which of the following attributes is a valid attritubes of the
|
A. | Verify |
B. | check |
C. | select |
D. | test |
Answer» E. | |
47. |
If a browser has java script turned off, it will |
A. | ignore all <script> and <no script> tags |
B. | display the content of <script> tags |
C. | display the content of <no script> tags |
D. | display the content of <script> and <no script> tags |
Answer» D. display the content of <script> and <no script> tags | |
48. |
The element
|
A. | similarly to switch in other programming languages |
B. | Inside xsl : apply – templates and xsl : for – each elements |
C. | Inside xsl : template to select the elements the template is applied to |
D. | never; sort is an attribute, not an element |
Answer» C. Inside xsl : template to select the elements the template is applied to | |
49. |
Which of the following is not a valid X path expression? |
A. | // |
B. | $ |
C. | / |
D. | @ |
Answer» C. / | |
50. |
Which of the following is the greatest strength of XML schema? |
A. | It supports graphics |
B. | It supports images |
C. | It supports data types |
D. | It supports functions |
Answer» D. It supports functions | |