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

Preprocessor in C Language — प्रश्न और उत्तर

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

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

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

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

#include <stdio.h>

    #define MIN 0);

    #ifdef MIN

    #define MAX 10

    #endif

    int main()

    {

        printf("%d %d\n", MAX, MIN

        return 0;

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

#include <stdio.h>

    #define MIN 0);

    #ifdef MIN

    #define MAX 10

    #endif

    int main()

    {

        printf("%d %d\n", MAX, MIN

        return 0;

    }
  1. A10 0
  2. Bprintf की गलत syntax के कारण कम्पाइल टाइम एररCompile time error due to illegal syntax for printf
  3. Cअपरिभाषित व्यवहारUndefined behaviour
  4. DMIN के गलत मान के कारण कम्पाइल टाइम एररCompile time error due to illegal MIN value

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

हल / Solution
MIN का पाठ "0);" है। #ifdef MIN सिर्फ़ यह देखता है कि MIN परिभाषित है या नहीं, उसका मान नहीं, इसलिए MAX 10 बन जाता है। अब printf("%d %d\n", MAX, MIN फैलकर printf("%d %d\n", 10, 0); बनता है। अधूरा दिखने वाला printf macro से पूरा हो जाता है। इसलिए कोड सही चलता है और 10 0 छपता है। preprocessor macro के पाठ में कोष्ठक या semicolon पर आपत्ति नहीं करता, इसलिए विकल्प 2 और 4 ग़लत हैं।
The text of MIN is "0);". #ifdef MIN only checks whether MIN is defined, not its value, so MAX becomes 10. Then printf("%d %d\n", MAX, MIN expands to printf("%d %d\n", 10, 0);. The printf that looks incomplete is completed by the macro. So the code runs and prints 10 0. The preprocessor does not object to brackets or a semicolon in a macro, so options 2 and 4 are wrong, and so is option 3.
प्रश्न 2उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #define MIN 0

    #if MIN

    #define MAX 10

    #endif

    int main()

    {

        printf("%d %d\n", MAX, MIN);

        return 0;

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

#include <stdio.h>

    #define MIN 0

    #if MIN

    #define MAX 10

    #endif

    int main()

    {

        printf("%d %d\n", MAX, MIN);

        return 0;

    }
  1. A10 0
  2. Bकम्पाइल टाइम एररCompile time error
  3. Cअपरिभाषित व्यवहारUndefined behaviour
  4. Dउल्लिखित में से कोई नहींNone of the mentioned

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

हल / Solution
MIN का मान 0 है, इसलिए #if MIN की शर्त झूठी है। उसके भीतर का #define MAX 10 हट जाता है, यानी MAX कभी परिभाषित नहीं होता। अब printf में MAX जस का तस बचता है और compiler उसे एक अनजान identifier मानता है। इसलिए "undeclared identifier" की compile time error आती है। 10 0 तब छपता जब #ifdef MIN लिखा होता, क्योंकि MIN परिभाषित है, भले उसका मान 0 हो। यहाँ undefined behaviour नहीं है, error पक्की है।
MIN has the value 0, so the condition #if MIN is false. The #define MAX 10 inside it is dropped, so MAX is never defined. In printf, MAX stays as it is, and the compiler sees it as an unknown identifier. So an "undeclared identifier" compile time error occurs. 10 0 would be printed only with #ifdef MIN, because MIN is defined even though its value is 0. There is no undefined behaviour here; the error is certain.
प्रश्न 3उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #define COLD

    int main()

    {

        #ifdef COLD

        printf("COLD\t");

        #undef COLD

        #endif

        #ifdef COLD

        printf("HOT\t");

        #endif

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

#include <stdio.h>

    #define COLD

    int main()

    {

        #ifdef COLD

        printf("COLD\t");

        #undef COLD

        #endif

        #ifdef COLD

        printf("HOT\t");

        #endif

    }
  1. AHOT
  2. BCOLD
  3. CCOLD HOT
  4. Dकोई आउटपुट नहींNo Output

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

हल / Solution
शुरू में COLD परिभाषित है, इसलिए पहले #ifdef COLD का भाग बना रहता है। उसमें printf("COLD\t") है, और #undef COLD से macro हट जाता है। preprocessor ऊपर से नीचे चलता है, इसलिए दूसरे #ifdef COLD तक COLD परिभाषित नहीं रहता। वह भाग हट जाता है और HOT वाला printf compile ही नहीं होता। इसलिए आउटपुट सिर्फ़ COLD है, उसके बाद एक tab। COLD HOT या केवल HOT ग़लत हैं, और कुछ न छपना भी ग़लत है।
At the start COLD is defined, so the first #ifdef COLD block is kept. It holds printf("COLD\t"), and #undef COLD then removes the macro. The preprocessor works from top to bottom, so by the second #ifdef COLD, COLD is no longer defined. That block is dropped, and the HOT printf is never compiled. So the output is only COLD, followed by a tab. COLD HOT and HOT alone are wrong, and "No Output" is wrong too, because COLD is printed.
प्रश्न 4उत्तर + हल
कंडीशनल इन्क्लूज़न में "else if" किसके द्वारा लिखा जाता है?
The “else if” in conditional inclusion is written by?
  1. A#else if
  2. B#elseif
  3. C#elsif
  4. D#elif

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

हल / Solution
conditional inclusion में "else if" के लिए C का directive #elif है। इसका रूप है: #if शर्त1 … #elif शर्त2 … #else … #endif। #elif की शर्त तभी देखी जाती है जब ऊपर की सारी शर्तें झूठी हों। #else if में preprocessor #else को पहचानता है और बाद का if फालतू पाठ बन जाता है, इसलिए वह else if का काम नहीं करता। #elseif और #elsif नाम के directive C में हैं ही नहीं। इसलिए सही उत्तर #elif है।
In conditional inclusion, the C directive for "else if" is #elif. Its form is #if condition1 ... #elif condition2 ... #else ... #endif. The #elif condition is checked only when all earlier conditions are false. In #else if, the preprocessor sees #else and treats the following if as extra text, so it does not work as else if. Directives named #elseif or #elsif do not exist in C at all. So the correct answer is #elif, option 4.
प्रश्न 5उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #define Cprog

    int main()

    {

        int a = 2;

        #ifdef Cprog

        a = 1;

        printf("%d", Cprog);

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

#include <stdio.h>

    #define Cprog

    int main()

    {

        int a = 2;

        #ifdef Cprog

        a = 1;

        printf("%d", Cprog);

    }
  1. Aचलाने पर कोई आउटपुट नहींNo output on execution
  2. Bआउटपुट 1Output as 1
  3. Cआउटपुट 2Output as 2
  4. Dकम्पाइल टाइम एररCompile time error

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

हल / Solution
इस कोड में दो गलतियाँ हैं। पहली, #ifdef Cprog खोला गया है पर उसका #endif कहीं नहीं है। हर #if या #ifdef को #endif से बंद करना ज़रूरी है, वरना "unterminated conditional directive" error आती है। दूसरी, Cprog एक ख़ाली macro है, इसलिए printf("%d", Cprog) फैलकर printf("%d", ) बनता है, जो अधूरा भाव है। दोनों कारणों से program compile नहीं होता, इसलिए 1, 2 या ख़ाली आउटपुट का सवाल ही नहीं उठता।
This code has two mistakes. First, #ifdef Cprog is opened but never closed with #endif. Every #if or #ifdef must end with #endif, otherwise an "unterminated conditional directive" error appears. Second, Cprog is an empty macro, so printf("%d", Cprog) expands to printf("%d", ), which is an incomplete expression. For both reasons the program does not compile, so there is no question of printing 1, 2 or nothing. The answer is compile time error.
प्रश्न 6उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #define SYSTEM 20

    int main()

    {

        int a = 20;

        #if SYSTEM == a

        printf("HELLO ");

        #endif

        #if SYSTEM == 20

        printf("WORLD\n");

        #endif

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

#include <stdio.h>

    #define SYSTEM 20

    int main()

    {

        int a = 20;

        #if SYSTEM == a

        printf("HELLO ");

        #endif

        #if SYSTEM == 20

        printf("WORLD\n");

        #endif

    }
  1. AHELLO
  2. BWORLD
  3. CHELLO WORLD
  4. Dकोई आउटपुट नहींNo Output

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

हल / Solution
#if की शर्त preprocessing के समय जाँची जाती है, जब variable बने ही नहीं होते। इसलिए #if SYSTEM == a में a एक अनजान identifier है, और #if में ऐसे हर identifier को 0 मान लिया जाता है। शर्त 20 == 0 बनती है, जो झूठी है, इसलिए HELLO वाली पंक्ति हट जाती है। दूसरी शर्त 20 == 20 सच है, इसलिए WORLD छपता है। int a = 20 का #if पर असर नहीं होता।
An #if condition is checked during preprocessing, before any variable exists. So in #if SYSTEM == a, a is an unknown identifier, and #if treats every such identifier as 0. The condition becomes 20 == 0, which is false, so the HELLO line is removed. The second condition, 20 == 20, is true, so WORLD is printed. int a = 20 has no effect on #if, so HELLO WORLD is wrong, and so is "No Output".
प्रश्न 7उत्तर + हल
निम्नलिखित C कोड के आउटपुट पर टिप्पणी कीजिए

#include <stdio.h>

    #define var 20);

    int main()

    {

        printf("%d\n", var

    }
Comment on the output of the following C code

#include <stdio.h>

    #define var 20);

    int main()

    {

        printf("%d\n", var

    }
  1. Aकोई एरर नहीं, यह आउटपुट 20 दिखाएगाNo errors, it will show the output 20
  2. Bकम्पाइल टाइम एरर, printf के कोष्ठक बंद नहीं होतेCompile time error, the printf braces aren’t closed
  3. Cकम्पाइल टाइम एरर, #define में कोई खुला कोष्ठक नहीं हैCompile time error, there are no open braces in #define
  4. Dउल्लिखित में से कोई नहींNone of the mentioned

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

हल / Solution
#define var 20); में var का पाठ "20);" है, यानी संख्या, बंद कोष्ठक और semicolon। preprocessor सिर्फ़ पाठ बदलता है, वह कोष्ठकों के जोड़े नहीं गिनता। इसलिए printf("%d\n", var फैलकर printf("%d\n", 20); बन जाता है। अब कोष्ठक पूरे हैं और statement सही है, इसलिए 20 छपता है। printf का कोष्ठक macro से बंद हो जाता है, इसलिए विकल्प 2 ग़लत है। macro में अकेला बंद कोष्ठक होना भी वैध है, इसलिए विकल्प 3 भी ग़लत है।
In #define var 20); the text of var is "20);", a number, a closing bracket and a semicolon. The preprocessor only replaces text; it does not check that brackets are paired. So printf("%d\n", var becomes printf("%d\n", 20);. Now the brackets match, the statement is valid, and 20 is printed. The macro closes the printf bracket, so option 2 is wrong. A lone closing bracket in a macro is allowed, so option 3 is wrong too.
प्रश्न 8उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #define A 1 + 2

    #define B 3 + 4

    int main()

    {

        int var = A * B;

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

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

#include <stdio.h>

    #define A 1 + 2

    #define B 3 + 4

    int main()

    {

        int var = A * B;

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

    }
  1. A9
  2. B11
  3. C12
  4. D21

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

हल / Solution
A और B पाठ के रूप में फैलते हैं, कोष्ठक के साथ नहीं। इसलिए A * B बनता है 1 + 2 * 3 + 4। गुणा पहले होता है, तो 2 * 3 = 6, फिर 1 + 6 + 4 = 11। कोष्ठक होते तो (1 + 2) * (3 + 4) = 21 आता; यही भटकाने वाला विकल्प है। इस पाठ से न 9 बनता है, न 12। इसलिए macro के पाठ को कोष्ठक में लिखिए।
A and B expand as plain text, without brackets. So A * B becomes 1 + 2 * 3 + 4. Multiplication comes first, so 2 * 3 = 6, then 1 + 6 + 4 = 11. With brackets, (1 + 2) * (3 + 4) would give 21, which is the trap option. Neither 9 nor 12 comes out of this text. That is why macro bodies should be wrapped in brackets.
प्रश्न 9उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    # define max

    void m()

    {

        printf("hi");

    }

    void main()

    {

        max;

        m();

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

#include <stdio.h>

    # define max

    void m()

    {

        printf("hi");

    }

    void main()

    {

        max;

        m();

    }
  1. Aरन टाइम एररRun time error
  2. Bhi hi
  3. Cकुछ नहीं (Nothing)Nothing
  4. Dhi

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

हल / Solution
# define max में max के बाद कोई पाठ नहीं है, यानी max एक ख़ाली macro है। # और define के बीच space भी वैध है। main में max; फैलकर सिर्फ़ ; बचता है, जो एक ख़ाली statement है और कुछ नहीं करता। इसके बाद m() एक बार चलता है और hi छपता है। m() दोबारा नहीं बुलाया गया, इसलिए hi hi ग़लत है। कोड वैध है, इसलिए न run time error आता है, न आउटपुट ख़ाली रहता है।
In # define max, nothing follows max, so max is an empty macro. A space between # and define is also allowed. In main, max; expands to just ;, which is an empty statement and does nothing. Then m() runs once and prints hi. m() is not called a second time, so hi hi is wrong. The code is valid, so there is no run time error and the output is not empty. The correct answer is hi.
प्रश्न 10उत्तर + हल
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    void main()

    {

        #define max 45

        max = 32;

        printf("%d", max);

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

#include <stdio.h>

    void main()

    {

        #define max 45

        max = 32;

        printf("%d", max);

    }
  1. A32
  2. B45
  3. Cकम्पाइल टाइम एररCompile time error
  4. Dबदलता रहता है (Varies)Varies

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

हल / Solution
#define max 45 के बाद max कोई variable नहीं रहता, वह सीधे 45 से बदल जाता है। इसलिए max = 32; फैलकर 45 = 32; बनता है। assignment के बाईं ओर ऐसी चीज़ चाहिए जिसकी memory में जगह हो, यानी lvalue। 45 एक स्थिर संख्या है, उसमें कुछ रखा नहीं जा सकता, इसलिए compiler error देता है। program बनता ही नहीं, तो 32 या 45 नहीं छपता। हर compiler यह पकड़ता है, इसलिए Varies भी ग़लत है।
After #define max 45, max is not a variable; it is simply replaced by 45. So max = 32; becomes 45 = 32;. The left side of an assignment must be something stored in memory, called an lvalue. 45 is a constant, so nothing can be stored in it, and the compiler reports an error. The program is never built, so neither 32 nor 45 is printed. Every compiler catches this, so "Varies" is wrong.
आगे के 20 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
App खोलिए
प्रश्न 11उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    void main()

    {

        #define const int

        const max = 32;

        printf("%d", max);

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

#include <stdio.h>

    void main()

    {

        #define const int

        const max = 32;

        printf("%d", max);

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

#include <stdio.h>

    void main()

    {

        #define max 37

        printf("%d", max);

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

#include <stdio.h>

    void main()

    {

        #define max 37

        printf("%d", max);

    }
  1. A37
  2. Bरन टाइम एररRun time error
  3. Cबदलता रहता है (Varies)Varies
  4. Dकम्पाइलर पर निर्भर करता हैDepends on compiler
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 13उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    void main()

    {

        #define max 37;

        printf("%d", max);

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

#include <stdio.h>

    void main()

    {

        #define max 37;

        printf("%d", max);

    }
  1. A37
  2. Bकम्पाइल टाइम एररCompile time error
  3. Cबदलता रहता है (Varies)Varies
  4. Dकम्पाइलर पर निर्भर करता हैDepends on compiler
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 14उत्तर app में
const की तुलना में #define का क्या लाभ है?
What is the advantage of #define over const?
  1. Aडेटा टाइप लचीला (flexible) होता हैData type is flexible
  2. Bउसका pointer बनाया जा सकता हैCan have a pointer
  3. Cप्रोग्राम का साइज़ कम होता हैReduction in the size of the program
  4. Dउल्लिखित में से कोई नहींNone of the mentioned
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 15उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    int foo(int, int);

    #define foo(x, y) x / y + x

    int main()

    {

        int i = -6, j = 3;

        printf("%d ",foo(i + j, 3));

        #undef foo

        printf("%d\n",foo(i + j, 3));

    }

    int foo(int x, int y)

    {

        return x / y + x;

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

#include <stdio.h>

    int foo(int, int);

    #define foo(x, y) x / y + x

    int main()

    {

        int i = -6, j = 3;

        printf("%d ",foo(i + j, 3));

        #undef foo

        printf("%d\n",foo(i + j, 3));

    }

    int foo(int x, int y)

    {

        return x / y + x;

    }
  1. A-8 -4
  2. Bकम्पाइल टाइम एररCompile time error
  3. C-8 -8
  4. Dअपरिभाषित व्यवहारUndefined behaviour
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 16उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #define foo(x, y) x / y + x

    int main()

    {

        int i = -6, j = 3;

        printf("%d ", foo(i + j, 3));

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

        return 0;

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

#include <stdio.h>

    #define foo(x, y) x / y + x

    int main()

    {

        int i = -6, j = 3;

        printf("%d ", foo(i + j, 3));

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

        return 0;

    }
  1. A-8 -4
  2. B-4 शून्य से भाग का exception-4 divided by zero exception
  3. C-4 -4
  4. Dशून्य से भाग का exception (Divided by zero exception)Divided by zero exception
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 17उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    void f();

    int main()

    {

        #define max 10

        f();

        return 0;

    }

    void f()

    {

        printf("%d\n", max * 10);

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

#include <stdio.h>

    void f();

    int main()

    {

        #define max 10

        f();

        return 0;

    }

    void f()

    {

        printf("%d\n", max * 10);

    }
  1. A100
  2. Bकम्पाइल टाइम एरर, क्योंकि #define फंक्शन के अंदर नहीं हो सकताCompile time error since #define cannot be inside functions
  3. Cकम्पाइल टाइम एरर, क्योंकि max f() में दिखाई नहीं देताCompile time error since max is not visible in f()
  4. Dअपरिभाषित व्यवहारUndefined behaviour
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 18उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    void f();

    int main()

    {

        #define foo(x, y) x / y + x

        f();

    }

    void f()

    {

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

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

#include <stdio.h>

    void f();

    int main()

    {

        #define foo(x, y) x / y + x

        f();

    }

    void f()

    {

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

    }
  1. A-8
  2. B-4
  3. Cकम्पाइल टाइम एररCompile time error
  4. Dअपरिभाषित व्यवहारUndefined behaviour
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 19उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #define foo(x, y) x / y + x

    int main()

    {

        int i = -6, j = 3;

        printf("%d\n",foo(i + j, 3));

        return 0;

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

#include <stdio.h>

    #define foo(x, y) x / y + x

    int main()

    {

        int i = -6, j = 3;

        printf("%d\n",foo(i + j, 3));

        return 0;

    }
  1. Aशून्य से भाग का exception (Divided by zero exception)Divided by zero exception
  2. Bकम्पाइल टाइम एररCompile time error
  3. C-8
  4. D-4
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 20उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #define foo(x, y) #x #y

    int main()

    {

        printf("%s\n", foo(k, l));

        return 0;

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

#include <stdio.h>

    #define foo(x, y) #x #y

    int main()

    {

        printf("%s\n", foo(k, l));

        return 0;

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

#include <stdio.h>

    #define foo(m, n) m ## n

    int main()

    {

        printf("%s\n", foo(k, l));

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

#include <stdio.h>

    #define foo(m, n) m ## n

    int main()

    {

        printf("%s\n", foo(k, l));

    }
  1. Ak l
  2. Bkl
  3. Cकम्पाइल टाइम एररCompile time error
  4. Dअपरिभाषित व्यवहारUndefined behaviour
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 24उत्तर app में
निम्नलिखित C कोड का आउटपुट क्या होगा?

#include <stdio.h>

    #include "printf"

    void main()

    {

        printf("hello");

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

#include <stdio.h>

    #include "printf"

    void main()

    {

        printf("hello");

    }
  1. Ahello
  2. Bत्रुटि (Error)Error
  3. Cकम्पाइलर पर निर्भर करता हैDepends on compiler
  4. Dबदलता रहता है (Varies)Varies
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 25उत्तर app में
नीचे दी गई दो पंक्तियाँ ________ के समतुल्य हैं

#define C_IO_HEADER <stdio.h>

    #include C_IO_HEADER
The below two lines are equivalent to ________

#define C_IO_HEADER <stdio.h>

    #include C_IO_HEADER
  1. A#include<stdlib.h>
  2. B#include"printf"
  3. C#include"C_IO_HEADER"
  4. D#include<stdio.h>
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 26उत्तर app में
यदि फ़ाइल का नाम कोण कोष्ठक (angle brackets) में लिखा हो, तो ___________
If the file name is enclosed in angle brackets, then ___________
  1. Aप्रीप्रोसेसर इसे यूजर-डिफ़ाइंड फ़ाइल के रूप में मानता हैThe preprocessor treats it as a user-defined file
  2. Bप्रीप्रोसेसर इसे सिस्टम-डिफ़ाइंड फ़ाइल के रूप में मानता हैThe preprocessor treats it as a system-defined file
  3. Cप्रीप्रोसेसर इसे यूजर-डिफ़ाइंड फ़ाइल और सिस्टम-डिफ़ाइंड फ़ाइल के रूप में मानता हैThe preprocessor treats it as a user-defined file & system-defined file
  4. Dउल्लिखित में से कोई नहींNone of the mentioned
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 27उत्तर app में
यदि आप एक फ़ाइल stdio.h बनाते हैं और #include “stdio.h” का उपयोग करते हैं, तो क्या होगा?
What would happen if you create a file stdio.h and use #include “stdio.h”?
  1. Aप्रिडिफाइंड लाइब्रेरी फ़ाइल का चयन किया जाएगाThe predefined library file will be selected
  2. Bयूजर डिफाइंड लाइब्रेरी फाइल का चयन किया जाएगाThe user-defined library file will be selected
  3. Cदोनों फाइलों को शामिल किया जाएगाBoth the files will be included
  4. Dकंपाइलर प्रोग्राम को स्वीकार नहीं करेगाThe compiler won’t accept the program
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 28उत्तर app में
प्रीप्रोसेसर के लिए <> के भीतर लिखी फ़ाइल देखने का क्रम क्या है?
What is the sequence for the preprocessor to look for files within <>?
  1. Aप्रिडिफाइंड स्थान फिर करंट डाइरेक्ट्रीजThe predefined location then the current directory
  2. Bकरंट डाइरेक्ट्रीज फिर प्रिडिफाइंड स्थानThe current directory then the predefined location
  3. Cकेवल प्रिडिफाइंड स्थानThe predefined location only
  4. Dकरंट डाइरेक्ट्रीज स्थानThe current directory location
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 29उत्तर app में
यदि फ़ाइल नाम के साथ डबल कोट्स (" ") में #include का उपयोग किया जाता है, तो
If #include is used with the file name in double quotes (" ")
  1. Aफ़ाइल को मानक कंपाइलर में include पाथ करने के लिए खोजा गया हैThe file is searched for in the standard compiler include paths
  2. Bवर्तमान सोर्स डायरेक्ट्रीज को शामिल करने के लिए सर्च पाथ का विस्तार किया गया हैthe search path is expanded to include the current source directories
  3. Cसर्च पाथ का विस्तार होगाthe search path will expand
  4. Dउल्लिखित में से कोई नहींnone of the above
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
प्रश्न 30उत्तर app में
#include डायरेक्टिव क्या है?
What is the #include directive?
  1. Aप्रीप्रोसेसर को फ़ाइल के टेक्स्ट को पकड़ने और इसे सीधे वर्तमान फ़ाइल में रखने के लिए कहता हैtells the preprocessor to grab the text of the file and place it directly in the current file
  2. Bइन स्टेटमेंट्स को एक प्रोग्राम के शीर्ष पर रखा जाना चाहिएthese statements should be placed at the top of a program
  3. Cउल्लिखित सभीall of the above
  4. Dउल्लिखित में से कोई नहींnone of the above
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
Preprocessor in C Language के सभी 78 प्रश्न — उत्तर, हल और अभ्यास

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

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

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

C Language के दूसरे topics

सभी topics