Quiz-1

Q 1. A switch statement is used to / एक स्विच स्टेटमेंट का उपयोग किया जाता है

  1. To use switching variable
  2. Switch between function in program char
  3. Switch from one variable to another variable
  4. To choose from multiple possibilities which may arise due to different values of a variable

Q 2. Data type of the controlling statement of a SWITCH statement cannot of the type: / SWITCH स्टेटमेंट के कंट्रोलिंग स्टेटमेंट का डेटा टाइप टाइप का नहीं हो सकता:

  1. int
  2. char
  3. short
  4. float

Q 3. In_______, the bodies of the two loops are merged together to from a single loop provided that they do not make only references to each other. / _______ में, दो लूपों के शरीर को एक लूप से एक साथ मिला दिया जाता है बशर्ते कि वे केवल एक दूसरे के संदर्भ में न हों।

  1. Loop unrolling
  2. Strength reduction
  3. Loop concatenation
  4. Loop jamming

Q 4. Example of iteration in C. / सी में पुनरावृत्ति का उदाहरण।

  1. for
  2. while
  3. do-while
  4. All of the mentioned

Q 5. Which of the following is correct with respect to “Jump Statements” in C? / C में "जंप स्टेटमेंट" के संबंध में निम्नलिखित में से कौन सा सही है?

  1. goto
  2. continue
  3. break
  4. All of the above

Q 6. What is the output of this C code? / इस सी कोड का आउटपुट क्या है?
void main()
{
int i = 0;
int j = 0;
for (i = 0;i < 5; i++)
{
for (j = 0;j < 4; j++)
{
if (i > 1)
continue;
printf("Hi \n");
}
}
}

  1. Hi is printed 9 times
  2. Hi is printed 8 times
  3. Hi is printed 7 times
  4. Hi is printed 6 times

Q 7. Choose a correct C Statement regarding for loop. 
for(; ;);
लूप के संबंध में एक सही C कथन चुनें।
के लिए(; ;);

  1. for loop works exactly first time
  2. for loop works infinite number of times
  3. Compiler error
  4. None of the above

Q 8. Which are not looping structures? / कौन सी लूपिंग संरचनाएं नहीं हैं?

  1. For loop
  2. While loop
  3. Do...while loop
  4. if…else

Q 9. Which keyword can be used for coming out of recursion? / रिकर्सन से बाहर आने के लिए किस कीवर्ड का उपयोग किया जा सकता है?

  1. break
  2. return
  3. exit
  4. Both (a) and (b)

Q 10. How many times the program will print "Fliqi"? / प्रोग्राम कितनी बार "फ्लिकी" प्रिंट करेगा?
int main() {
printf("Fliqi");
main();
return 0;
}

  1. Infinite times
  2. 32767 times
  3. 65535 times
  4. Till stack overflows