FliQi Education App Download
प्रश्न-बैंक · C Language

Jump Statements — प्रश्न और उत्तर

C Language · 35 जाँचे हुए (verified) प्रश्न

  • 35 जाँचे हुए प्रश्न
  • हिंदी + English

पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 20 के उत्तर और हल FliQi Question Bank app में।

भाषा
प्रश्न 1उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i, j;

    for(i = 1;i<=5;i++){

        for(j = 1;j<=5;j++){

                    if(i == j)

                        continue;

                    printf("FliQi ");

        }

    }

    return 0;

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i, j;

    for(i = 1;i<=5;i++){

        for(j = 1;j<=5;j++){

                    if(i == j)

                        continue;

                    printf("FliQi ");

        }

    }

    return 0;

}
  1. AFliQi को 24 बार प्रिंट किया जाएगाFliQi will be printed 24 times
  2. BFliQi को 25 बार प्रिंट किया जाएगाFliQi will be printed 25 times
  3. CFliQi को 20 बार प्रिंट किया जाएगाFliQi will be printed 20 times
  4. DFliQi को 21 बार प्रिंट किया जाएगाFliQi will be printed 21 times

सही उत्तर / Answer: (C)

हल / Solution
दोनों लूप 1 से 5 तक चलते हैं, इसलिए कुल 5 × 5 = 25 जोड़े बनते हैं। जब i और j बराबर होते हैं, तब continue चलता है और printf छूट जाता है। ऐसे जोड़े 5 हैं: (1,1), (2,2), (3,3), (4,4), (5,5)। इसलिए FliQi 25 − 5 = 20 बार छपता है। continue सिर्फ़ अंदर वाले लूप की मौजूदा बारी छोड़ता है, लूप नहीं तोड़ता।
Both loops run from 1 to 5, so there are 5 × 5 = 25 pairs in all. When i equals j, continue runs and the printf is skipped. There are 5 such pairs: (1,1), (2,2), (3,3), (4,4) and (5,5). So FliQi is printed 25 − 5 = 20 times. continue only skips the current pass of the inner loop; it does not end the loop.
प्रश्न 2उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i;

    for(i = 1;i<=10;i++){

        if(i!=5){

                    continue;

        }

        printf("FliQi ");

    }

    return 0;

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i;

    for(i = 1;i<=10;i++){

        if(i!=5){

                    continue;

        }

        printf("FliQi ");

    }

    return 0;

}
  1. AFliQi को 1 बार प्रिंट किया जाएगाFliQi will be printed 1 times
  2. BFliQi को 9 बार प्रिंट किया जाएगाFliQi will be printed 9 times
  3. CFliQi को 10 बार प्रिंट किया जाएगाFliQi will be printed 10 times
  4. DFliQi को 0 बार प्रिंट किया जाएगाFliQi will be printed 0 times

सही उत्तर / Answer: (A)

हल / Solution
जब i 5 नहीं होता, तब continue चलता है और printf छूट जाता है। यानी i = 1 से 4 और 6 से 10 तक, कुल 9 बारियों में कुछ नहीं छपता। सिर्फ़ i = 5 पर शर्त i != 5 झूठी होती है, continue नहीं चलता और FliQi छपता है। इसलिए FliQi केवल 1 बार छपता है। 9 बार वाला विकल्प छूटी हुई बारियों को गिनता है।
Whenever i is not 5, continue runs and the printf is skipped. So for i = 1 to 4 and 6 to 10, nine passes in all, nothing is printed. Only at i = 5 is the condition i != 5 false, so continue does not run and FliQi is printed. So FliQi is printed just 1 time. The 9 times option counts the skipped passes instead.
प्रश्न 3उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i;

    for(i = 1;i<=10;i++){

        printf("FliQi ");

        if(i==5){

            break;

                continue;

        }

    }

    return 0;

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i;

    for(i = 1;i<=10;i++){

        printf("FliQi ");

        if(i==5){

            break;

                continue;

        }

    }

    return 0;

}
  1. AFliQi को 4 बार प्रिंट किया जाएगाFliQi will be printed 4 times
  2. BFliQi को 9 बार प्रिंट किया जाएगाFliQi will be printed 9 times
  3. CFliQi को 5 बार प्रिंट किया जाएगाFliQi will be printed 5 times
  4. DFliQi को 7 बार प्रिंट किया जाएगाFliQi will be printed 7 times

सही उत्तर / Answer: (C)

हल / Solution
हर बारी में पहले FliQi छपता है, फिर if (i == 5) जाँचा जाता है। i = 1 से 4 तक शर्त झूठी है, इसलिए लूप चलता रहता है और FliQi चार बार छपता है। i = 5 पर पहले FliQi पाँचवीं बार छपता है, फिर break लूप तोड़ देता है। break के नीचे लिखा continue कभी नहीं चलता। इसलिए FliQi कुल 5 बार छपता है, 4 बार नहीं।
In each pass FliQi is printed first, and then if (i == 5) is checked. For i = 1 to 4 the condition is false, so the loop continues and FliQi is printed four times. At i = 5, FliQi is printed a fifth time and then break ends the loop. The continue below break never runs. So FliQi is printed 5 times in total.
प्रश्न 4उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int a = 5;

    if(a!=5){

        printf("FliQi");

        break;

    }

    else{

        printf("FliQi India");

    }

    return 0;

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int a = 5;

    if(a!=5){

        printf("FliQi");

        break;

    }

    else{

        printf("FliQi India");

    }

    return 0;

}
  1. AFliQi
  2. BFliQi India
  3. Cकुछ भी प्रिंट नहींPrint Nothing
  4. Dकंपाइल टाइम एररCompile Time Error

सही उत्तर / Answer: (D)

हल / Solution
यहाँ break एक if के अंदर है और पूरे main में कोई लूप या switch नहीं है। C में break सिर्फ़ लूप या switch के अंदर ही लिखा जा सकता है। यह नियम कंपाइल के समय जाँचा जाता है, इसलिए शर्त a != 5 झूठी होने से कोई फ़र्क़ नहीं पड़ता। कंपाइलर error देता है और प्रोग्राम बनता ही नहीं। इसलिए FliQi India भी नहीं छपता।
Here break is inside an if, and there is no loop or switch anywhere in main. In C, break may be written only inside a loop or a switch. This rule is checked at compile time, so it does not matter that the condition a != 5 is false. The compiler reports an error and the program is never built. So even FliQi India is not printed.
प्रश्न 5उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i;

    for(i = 1;i<=10;i++){

        if(i==5){

                    printf("FliQi");

        }

        break;

    }

    return 0;

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i;

    for(i = 1;i<=10;i++){

        if(i==5){

                    printf("FliQi");

        }

        break;

    }

    return 0;

}
  1. AFliQi
  2. BFliQi को 9 बार प्रिंट किया जाएगाFliQi will be printed 9 times
  3. CFliQi को 10 बार प्रिंट किया जाएगाFliQi will be printed 10 times
  4. DFliQi को 0 बार प्रिंट किया जाएगाFliQi will be printed 0 times

सही उत्तर / Answer: (D)

हल / Solution
ध्यान दीजिए कि break if के कोष्ठक के बाहर है, यानी यह हर बारी में चलता है। पहली बारी में i = 1 है। शर्त i == 5 झूठी है, इसलिए FliQi नहीं छपता। उसके तुरंत बाद break चलता है और लूप वहीं ख़त्म हो जाता है। i कभी 5 तक पहुँचता ही नहीं। इसलिए FliQi एक बार भी नहीं छपता, यानी 0 बार। 9 या 10 बार छपने का सवाल ही नहीं उठता।
Notice that break is outside the braces of the if, so it runs in every pass. In the first pass i is 1. The condition i == 5 is false, so FliQi is not printed. Right after that, break runs and the loop ends there. i never reaches 5. So FliQi is not printed even once, that is 0 times. Printing it 9 or 10 times is not possible.
प्रश्न 6उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i;

    for(i = 1;i<=10;i++){

        if(i%2==0){

                continue;

        }

        printf("%d ",i);

    }

    return 0;

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i;

    for(i = 1;i<=10;i++){

        if(i%2==0){

                continue;

        }

        printf("%d ",i);

    }

    return 0;

}
  1. A2 4 6 8 10
  2. B1 3 5 7 9
  3. Cकंपाइल टाइम एररCompile Time Error
  4. Dकुछ भी प्रिंट नहींPrint Nothing

सही उत्तर / Answer: (B)

हल / Solution
लूप i = 1 से 10 तक चलता है। जब i सम होता है, यानी i%2 == 0, तब continue चलता है और printf छूट जाता है। विषम i पर शर्त झूठी रहती है, इसलिए वही संख्या छपती है। इस तरह सिर्फ़ 1, 3, 5, 7 और 9 छपते हैं। 2 4 6 8 10 उलटा उत्तर है, जो तब मिलता जब विषम संख्याएँ छोड़ी जातीं। कोड में कोई error नहीं है।
The loop runs for i = 1 to 10. When i is even, that is i%2 == 0, continue runs and the printf is skipped. For odd i the condition is false, so that number is printed. So only 1, 3, 5, 7 and 9 are printed. 2 4 6 8 10 is the opposite result, which would come if odd numbers were skipped. The code has no error.
प्रश्न 7उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i;

    for(;;);{

        printf("FliQi");

        break;

    }

    return 0;

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i;

    for(;;);{

        printf("FliQi");

        break;

    }

    return 0;

}
  1. AFliQi
  2. Bअनंत लूपInfinite Loop
  3. Cकंपाइल टाइम एररCompile Time Error
  4. Dकुछ भी प्रिंट नहींPrint Nothing

सही उत्तर / Answer: (C)

हल / Solution
for(;;); के अंत में लगा सेमीकॉलन ध्यान दीजिए। यही सेमीकॉलन लूप की पूरी body है, यानी एक ख़ाली statement। नीचे वाला { } ब्लॉक लूप का हिस्सा नहीं, एक अलग ब्लॉक है। उस ब्लॉक में लिखा break अब किसी लूप या switch के अंदर नहीं है, इसलिए कंपाइलर error देता है। प्रोग्राम कंपाइल ही नहीं होता। यह error न होती तो for(;;); अनंत लूप बनता।
Notice the semicolon at the end of for(;;); . That semicolon is the whole loop body, an empty statement. The { } block below is not part of the loop; it is a separate block. The break inside that block is no longer inside any loop or switch, so the compiler reports an error. The program does not compile. Without that error, for(;;); would have been an infinite loop.
प्रश्न 8उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    printf("before continue ");

    continue;

    printf("after continue\n");

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    printf("before continue ");

    continue;

    printf("after continue\n");

}
  1. ABefore continue after continue
  2. BBefore continue
  3. CAfter continue
  4. Dकंपाइल टाइम एररCompile time error

सही उत्तर / Answer: (D)

हल / Solution
continue का काम लूप की अगली बारी पर भेजना है, इसलिए यह सिर्फ़ लूप के अंदर ही लिखा जा सकता है। यहाँ continue सीधे main के अंदर है, कोई लूप है ही नहीं। कंपाइलर इसे ग़लत मानकर error देता है। प्रोग्राम कंपाइल नहीं होता, इसलिए कोई भी printf नहीं चलता। पहला printf भी नहीं चलता, क्योंकि error चलाने से पहले, कंपाइल के समय ही आ जाती है।
continue sends control to the next pass of a loop, so it can be written only inside a loop. Here continue is placed directly in main, with no loop at all. The compiler treats this as an error. Since the program does not compile, no printf runs. Even the first printf does not run, because the error appears at compile time, before the program can ever execute.
प्रश्न 9उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i = 0;

    while(i < 2){

        if(i == 1)

            break;

        i++;

        if(i == 1)

            continue;

        printf("In while loop ");

    }

    printf("After loop ");

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i = 0;

    while(i < 2){

        if(i == 1)

            break;

        i++;

        if(i == 1)

            continue;

        printf("In while loop ");

    }

    printf("After loop ");

}
  1. AIn while loop After loop
  2. BAfter loop
  3. CIn while loop In while loop After loop
  4. DIn while loop

सही उत्तर / Answer: (B)

हल / Solution
पहली बारी में i = 0 है, इसलिए पहला if झूठा है। फिर i++ से i 1 होता है और दूसरा if सच हो जाता है, तो continue printf को छोड़कर शर्त पर भेज देता है। दूसरी बारी में i = 1 है, इसलिए पहला if सच है और break लूप तोड़ देता है। In while loop एक बार भी नहीं छपता। लूप के बाद केवल After loop छपता है।
In the first pass i is 0, so the first if is false. Then i++ makes i equal to 1, the second if is true, and continue skips the printf and goes back to the condition. In the second pass i is 1, so the first if is true and break ends the loop. In while loop is never printed. After the loop, only After loop is printed.
प्रश्न 10उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i = 0, j = 0;

    for (i; i < 2; i++){

        for (j = 0; j < 3; j++){

            printf("1 ");

            break;

        }

        printf("2 ");

    }

    printf("after loop ");

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i = 0, j = 0;

    for (i; i < 2; i++){

        for (j = 0; j < 3; j++){

            printf("1 ");

            break;

        }

        printf("2 ");

    }

    printf("after loop ");

}
  1. A1 2 after loop
  2. B1 after loop
  3. C1 2 1 2 after loop
  4. D1 1 2 after loop

सही उत्तर / Answer: (C)

हल / Solution
बाहरी लूप i = 0 और i = 1 के लिए दो बार चलता है। हर बार अंदर वाला लूप शुरू होते ही 1 छापता है और तुरंत break चलता है। यह break सिर्फ़ अंदर वाले लूप को तोड़ता है, बाहरी लूप चलता रहता है। फिर 2 छपता है। इस तरह 1 2 दो बार छपता है। अंत में after loop छपता है। इसलिए आउटपुट 1 2 1 2 after loop है। break पूरे प्रोग्राम के लूप नहीं तोड़ता।
The outer loop runs twice, for i = 0 and i = 1. Each time, the inner loop prints 1 and then break runs at once. This break ends only the inner loop; the outer loop keeps going. Then 2 is printed. So 1 2 appears twice. At the end after loop is printed. The output is 1 2 1 2 after loop. A break never ends every loop at once, only the nearest one.
आगे के 20 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
App खोलिए
प्रश्न 11उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i = 0;

    do{

        i++;

        if (i == 2)

            continue;

        printf("In while loop ");

    } while (i < 2);

    printf("%d", i);

    return 0;

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i = 0;

    do{

        i++;

        if (i == 2)

            continue;

        printf("In while loop ");

    } while (i < 2);

    printf("%d", i);

    return 0;

}
  1. AIn while loop 2
  2. BIn while loop in while loop 3
  3. CIn while loop 3
  4. Dअनंत लूपInfinite loop
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 12उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

void main(){

    int i = 0;

    if (i == 0){

        continue;

        printf("FliQi");

    }

}
What will be the output of the following C code?

#include <stdio.h>

void main(){

    int i = 0;

    if (i == 0){

        continue;

        printf("FliQi");

    }

}
  1. AFliQi अनगिनत बार प्रिंट होगाFliQi will be printed infinite times
  2. BFliQi
  3. Cकुछ भी प्रिंट नहीं होगाPrint Nothing
  4. Dकंपाइल टाइम एररCompile time error
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 13उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

void main(){

    int i = 0;

    for (i = 0;i < 5; i++)

        if (i < 4)

        {

            printf("FliQi");

                break;

        }

}
What will be the output of the following C code?

#include <stdio.h>

void main(){

    int i = 0;

    for (i = 0;i < 5; i++)

        if (i < 4)

        {

            printf("FliQi");

                break;

        }

}
  1. AFliQi 5 बार प्रिंट होगाFliQi will be printed 5 times
  2. BFliQi 4 बार प्रिंट होगाFliQi will be printed 4 times
  3. CFliQi
  4. DFliQi 3 बार प्रिंट होगाFliQi will be printed 3 times
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 14उत्तर app में
केवल उस इटरेशन के लिए लूप से बाहर आने के लिए किस कीवर्ड का उपयोग किया जाता है?
Which keyword is used to come out of a loop only for that iteration?
  1. Abreak
  2. Bcontinue
  3. Creturn
  4. Dइनमें से कोई नहींnone of the mentioned
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 15उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int a = 0, i = 0;

    for (i = 0;i < 5; i++){

            continue;       

            a++;

    }

    printf("%d %d",a, i);

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int a = 0, i = 0;

    for (i = 0;i < 5; i++){

            continue;       

            a++;

    }

    printf("%d %d",a, i);

}
  1. A2 5
  2. B1 4
  3. C0 5
  4. D5 5
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 16उत्तर app में
goto का उपयोग main() से दूसरे फ़ंक्शन में jump करने के लिए किया जा सकता है
goto can be used to jump from main() to another function
  1. Aसत्यtrue
  2. Bअसत्यfalse
  3. Cकंपाइल टाइम एररCompile Time Error
  4. Dपरिस्थिति के अनुसार बदलता हैvaries
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 17उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

void main(){

    int i = 5, k;

    if (i == 0)

        goto label;

    label: printf("%d", i);

    printf(" FliQi ");

}
What will be the output of the following C code?

#include <stdio.h>

void main(){

    int i = 5, k;

    if (i == 0)

        goto label;

    label: printf("%d", i);

    printf(" FliQi ");

}
  1. A5
  2. BFliQi
  3. C5 FliQi
  4. Dकुछ नहींNothing
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 18उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

void main(){

    int i = 0, k;

    label: printf("%d", i);

    if (i == 0)

        goto label;

}
What will be the output of the following C code?

#include <stdio.h>

void main(){

    int i = 0, k;

    label: printf("%d", i);

    if (i == 0)

        goto label;

}
  1. A0
  2. B0 अनगिनत बारInfinite 0
  3. Cकुछ नहींNothing
  4. DएररError
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 19उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i = 0, j = 0;

    l1: while (i < 2){

        i++;

        while (j < 3){

            printf("FliQi ");

            goto l1;

        }

    }

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i = 0, j = 0;

    l1: while (i < 2){

        i++;

        while (j < 3){

            printf("FliQi ");

            goto l1;

        }

    }

}
  1. AFliQi FliQi
  2. Bकंपाइलेशन एररCompilation error
  3. CFliQi FliQi FliQi FliQi
  4. DFliQi अनगिनत बार प्रिंट होगाFliQi will be printed infinite times
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 20उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i = 0, j = 0;

    while (l1: i < 2){

        i++;

        while(j < 3){

            printf("loop\n");

            goto l1;

        }

    }

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i = 0, j = 0;

    while (l1: i < 2){

        i++;

        while(j < 3){

            printf("loop\n");

            goto l1;

        }

    }

}
  1. Aloop loop
  2. Bकंपाइलेशन एररCompilation error
  3. Cloop loop loop loop
  4. Dअनंत लूपInfinite loop
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 21उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    int i = 0, j = 0;

    while (i < 2){

        l1 :

            i++;

        while (j < 3){

            printf("FliQI ");

            goto l1;

        }

    }

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    int i = 0, j = 0;

    while (i < 2){

        l1 :

            i++;

        while (j < 3){

            printf("FliQI ");

            goto l1;

        }

    }

}
  1. AFliQI FliQI
  2. Bकंपाइलेशन एररCompilation error
  3. CFliQI FliQI FliQI FliQI
  4. DFliQI अनगिनत बार प्रिंट होगाFliQI will be pritned infinite time
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 22उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    printf("%d ", 1);

    goto l1;

    printf("%d ", 2);

}

void foo()

{

    l1 : printf("3 ", 3);

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    printf("%d ", 1);

    goto l1;

    printf("%d ", 2);

}

void foo()

{

    l1 : printf("3 ", 3);

}
  1. A1 2 3
  2. B1 3
  3. C1 3 2
  4. Dकंपाइलेशन एररCompilation error
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 23उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    printf("%d ", 1);

    l1:

    l2:

    printf("%d ", 2);

    printf("%d\n", 3);

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    printf("%d ", 1);

    l1:

    l2:

    printf("%d ", 2);

    printf("%d\n", 3);

}
  1. Aकंपाइलेशन एररCompilation error
  2. B1 2 3
  3. C1 2
  4. D1 3
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 24उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

int main(){

    printf("%d ", 1);

    goto l1;

    printf("%d ", 2);

    l1:

    goto l2;

    printf("%d ", 3);

    l2:

    printf("%d ", 4);

}
What will be the output of the following C code?

#include <stdio.h>

int main(){

    printf("%d ", 1);

    goto l1;

    printf("%d ", 2);

    l1:

    goto l2;

    printf("%d ", 3);

    l2:

    printf("%d ", 4);

}
  1. A1 4
  2. Bकंपाइलेशन एररCompilation error
  3. C1 2 4
  4. D1 3 4
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 25उत्तर app में
जंप स्टेटमेंट के बारे में निम्नलिखित में से कौन सा कथन असत्य है?
Which of the following statement is false about jump statements?
  1. Aहम लूप या स्विच स्टेटमेंट के बाहर ब्रेक जम्प स्टेटमेंट नहीं लिख सकते हैं।We cannot write break jump statement outside loop or switch statement
  2. Bयदि इनर लूप में ब्रेक स्टेटमेंट लिखा जाता है तो इनर लूप ही टर्मिनेट होगा।If break statement is written in inner loop then inner loop will terminate only
  3. Cgoto जंप स्टेटमेंट और उसके लेबल को एक ही फंक्शन में डिक्लेअर किया जाना चाहिए।The goto jump statement and its label must be declared in the same function
  4. Dरिटर्न जंप स्टेटमेंट इसे समाप्त करने के बाद कॉलर फ़ंक्शन पर नियंत्रण वापस नहीं करता है।The return jump statement does not return the control to the caller function after terminating it
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 26उत्तर app में
क्या हम ब्रेक और कंटीन्यू जम्प स्टेटमेंट का एक साथ उपयोग कर सकते हैं जैसे: -

#include<stdio.h>

int main(){

    int a=5;

    while(a>0){

        if(a==2){

                    break;

                    continue;

        }

        a--;

    }

    return 0;

}

निम्नलिखित में से कौन सा कथन सत्य है:-
Can we use break and continue jump statements together like:-

#include<stdio.h>

int main(){

    int a=5;

    while(a>0){

        if(a==2){

                    break;

                    continue;

        }

        a--;

    }

    return 0;

}

Which of the following statement is true:-
  1. Aहां, लेकिन ब्रेक का उपयोग कंटीन्यू स्टेटमेंट के ऊपर किया जाना चाहिएYes, but break must be used above continue statement
  2. Bहां, लेकिन ब्रेक स्टेटमेंट के ऊपर कंटीन्यू का उपयोग किया जाना चाहिएYes, but continue must be used above break statement
  3. Cहां, दोनों को किसी भी क्रम में इस्तेमाल किया जा सकता है, लेकिन यह बेहूदा हैYes, both can be used in any order, but it is senseless
  4. Dनहीं, संकलन समय त्रुटि होगीNo, Compile time error will occur
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
Jump Statements के सभी 35 प्रश्न — उत्तर, हल और अभ्यास

FliQi Question Bank app में topic-वार अभ्यास, कठिनाई-स्तर और आपकी प्रगति।

  • पहला test मुफ़्त
  • हिंदी + English
  • जाँचे हुए उत्तर और हल

यह topic किन परीक्षाओं में आता है

C Language के दूसरे topics

सभी topics