Class 6  >  C Programming for Beginners  >  Test: C Variables Download as PDF

Test: C Variables


Test Description

15 Questions MCQ Test C Programming for Beginners | Test: C Variables

Test: C Variables for Class 6 2022 is part of C Programming for Beginners preparation. The Test: C Variables questions and answers have been prepared according to the Class 6 exam syllabus.The Test: C Variables MCQs are made for Class 6 2022 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: C Variables below.
Solutions of Test: C Variables questions in English are available as part of our C Programming for Beginners for Class 6 & Test: C Variables solutions in Hindi for C Programming for Beginners course. Download more important topics, notes, lectures and mock test series for Class 6 Exam by signing up for free. Attempt Test: C Variables | 15 questions in 10 minutes | Mock test for Class 6 preparation | Free important questions MCQ to study C Programming for Beginners for Class 6 Exam | Download free PDF with solutions
1 Crore+ students have signed up on EduRev. Have you?
Test: C Variables - Question 1

What will be the output of the following C code?

    #include <stdio.h>
    int x;
    void main()
    {
        printf("%d", x);
    }

Test: C Variables - Question 2

What will be the output of the following C code?

    #include <stdio.h>
    int x = 5;
    void main()
    {
        int x = 3;
        printf("%d", x);
        {
            int x = 4;
        }
        printf("%d", x);
    }

Test: C Variables - Question 3

Global variables are ____________

Test: C Variables - Question 4

Which part of the program address space is p stored in the following C code?

    #include <stdio.h>
    int *p = NULL;
    int main()
    {
        int i = 0;
        p = &i;
        return 0;
    }

Test: C Variables - Question 5

What will be the output of the following C code (without linking the source file in which ary1 is defined)?

    #include <stdio.h>
    int main()
    {
        extern ary1[];
        printf("scope rules\n");
    }

Test: C Variables - Question 6

Array sizes are optional during array declaration by using ______ keyword.

Test: C Variables - Question 7

Automatic variables are allocated space in the form of a __________

Test: C Variables - Question 8

What is the scope of an automatic variable?

Test: C Variables - Question 9

What will be the output of the following C code?

     #include <stdio.h>
    int main()
    {
        printf("%d", d++);
    }
    int d = 10;

Test: C Variables - Question 10

What will be the output of the following C code?

    #include <stdio.h>
    static int x = 5;
    void main()
    {
        x = 9;
        {
            int x = 4;
        }
        printf("%d", x);
    }

Test: C Variables - Question 11

Comment on the following 2 C programs.

    #include <stdio.h> //Program 1
    int main()
    {
        int a;
        int b;
        int c;
    }
 
   #include <stdio.h> //Program 2
    int main()
    {
        int a;
        {
            int b;
        }
        {
            int c;
        }
    }

Test: C Variables - Question 12

What will be the output of the following C code?

    #include <stdio.h>
    static int x = 5;
    void main()
    {
        int x = 9;
        {
            x = 4;
        }
        printf("%d", x);
    }

Test: C Variables - Question 13

Automatic variables are stored in ________

Test: C Variables - Question 14

Which of the following storage class supports char data type?

Test: C Variables - Question 15

What will be the x in the following C code?

    #include <stdio.h>
    void main()
    {
        int x;
    }

10 videos|13 docs|15 tests
Use Code STAYHOME200 and get INR 200 additional OFF
Use Coupon Code
Information about Test: C Variables Page
In this test you can find the Exam questions for Test: C Variables solved & explained in the simplest way possible. Besides giving Questions and answers for Test: C Variables, EduRev gives you an ample number of Online tests for practice