Knowledge check.

- Choose one best answer from given 4 choices for each questions.
- Review before submit as you wont get a chance to review after submit.
- Max Time for quiz is 30 mins and Exam is 90 mins.
- Login is not required for an exam or a quiz.
- By submitting you formally acknowledge and accept terms and conditions mentioned here.

Question Number 1

Which of the following statements is not true about the fclose() function?

Question Number 2

Give the output of the following code snippet :
void main()
{
    static int x;
    if (x++ <  2)
    {
        printf("Ho " );
        main();
    }
}

Question Number 3

Give the output of the following code snippet :
void main()
{
    int i=3,x=10;
    i++;
    switch(i)
    {
case2:
        printf("%d ",x++);
        break;
case3:
        printf("%d ",x+2);
case4:
        printf("%d ",x+3);
    default:
        printf("Hello");
        break;
    }
}

Question Number 4

Which of the following are basic types of variables in C :

Question Number 5

Which of the following statements is true about the fclose() function?

Question Number 6

How many elements can the array arr[10][5] hold?

Question Number 7

Platforms and software supported by Visual Studio are,

Question Number 8

Versions of Visual Studio are,

Question Number 9

Show the correct order of execution for creating and executing a program in Visual Studio:

Question Number 10

Give the output of the following code snippet :
void main()
{
    int i=5;

    do
        printf("Hello world");
    while(!i);


}

Question Number 11

Give the output of the following code snippet :

int main()
{
    int n;
    for (n = 5; n!=0; n--)
        printf("%d ", n--);
    return 0;
}

Question Number 12

Which of the following methodologies are used to control the flow of the program in C?

Question Number 13

Give the output of the following code snippet :
void main()
{
    int i=0;
    int sum=0;
    do
    {
        printf("%d",i);
        sum+=i;
        i++;
    }
    while(!i);
}

Question Number 14

Give the output of the following code snippet :

int main()
{
    char c;
    FILE *fp;
    fp=fopen("myfile.txt","w");

    while((c=fgetc(fp))!=EOF)
        printf("%c",c);
    fclose(fp);
    return 0;
}

Assume the contents of file 'myfile.txt' contains " Hello world".

Question Number 15

Which of the following is related to a Microsoft Development tool package.

Question Number 16

Give the output of the following code snippet :
struct student
{
    int no;
};
void main()
{
    struct student s;
    no=10;
    printf("%d",no);
}

Question Number 17

Give the output of the following code snippet :
void main()
{
    int x=0,z;
    float p=2.4567;
    float q=5.6543;
    float r=0.0;
    printf("%4.4f",p+q-r);
}

Question Number 18

Give the output of the following code snippet :

void main()
{
    int x;
    for(x=1; x< =3; x++);
    printf("%d",x);
}

Question Number 19

Which of the keywords denote the size and type of a variable in C :

Question Number 20

Give the output of the following code snippet :
int func(int a)
{
    int b=10,i=0;
    while(a!=0)
    {
        int c=a+b;
        a--;
        b--;
        printf("%d ",c);
        break;
    }

    return 0;
}
int main()
{
    int x=5;
    func(x);
}

Question Number 21

Give the output of the following code snippet :
int main()
{
    float a,b;
    int func(int,float);
    a=func(100,250.5);
    b=func(20,20.75);
    printf("%.2f %.2f",a,b);
}
int func(int a,float b)
{
    return ((float)a+b);
}

Question Number 22

Give the output of the following code snippet :
void main()
{
    int a=13,b=20;
    if(!a==!b)
        printf("%d",++a);
    else
        printf("%d",--b);
}

Question Number 23

Which of the following are true about variables in C:

Question Number 24

Which of the following functions is used to rename a particular file?

Question Number 25

Which is the keyword used to create a structure in C?

Question Number 26

Give the output of the following code snippet :
struct p
{
    int k;
    char c;
};
int p = 10;
int main()
{
    struct p x;
    x.c = 'B';
    printf("%d %d\n", x.c, p);
}

Question Number 27

External static declaration can be applied to functions as well. State true or false :

Question Number 28

Versions of Visual Studio are,

Question Number 29

Give the output of the following code snippet :
struct p
{
    int k;
    char c;

};
int main()
{
    struct p x[5];
    x[0].k=15;
    x[0].c='B';
    printf("%d %c\n", x[0].k,x[0].c);
}

Question Number 30

Name the header file used to call the printf function in the main program.

Question Number 31

Give the output of the following code snippet :
void main()
{
    char x=10;
    do
    {
        x+=10;
        printf("%d ",x);

    }
    while(x!=20);
}

Question Number 32

Give the output of the following code snippet :
int temp = 100;
switch(temp)
{
case 10 :
    printf("10");
    break;
case 10 :
    printf("10");
    break;
case 100 :
    printf("1000");
    break;
default :
    printf("default");
    break;
}

Question Number 33

A new C program can be executed without being compiled . True or False?

Question Number 34

In C, which of the following are the possible scope of a variable?

Question Number 35

Which of the keywords denote the size and type of a variable in C :

Question Number 36

Which of the following are keywords in C:

Question Number 37

Give the output of the following code snippet :
void main()
{
    int x=0,y=1,z=2;
    if((x==y)&(z==x+2))
        printf("%d",z);
    else
        printf("%d",++x);
}

Question Number 38

Which of the following steps are required to execute a C program in Visual Studio?

Question Number 39

Which of the following is an example of looping in C?

Question Number 40

Which of the keywords denote the size and type of a variable in C :

Question Number 41

Give the output of the following code snippet :
struct Point
{
    int x;
    int y;
};

int main()
{
    struct Point p1 = {10};
    struct Point p2 = p1;
    printf("%d  %d", p2.x, p2.y);
    getchar();
}

Question Number 42

Give the output of the following code snippet :
int k()
{
    printf("Hello");
}
struct p
{
    int k();
    char c[10];

};
int main()
{
    struct p x;
    printf("%d",x.k());
}

Question Number 43

Give the output of the following code snippet :
void main()
{
    int a=13;
    if(a==12)
        a==12?a=0:a=1;
    else
        a--;
    printf("%d",a);
}

Question Number 44

Give the output of the following code snippet :
void main()
{
    for (int i=0; i <  2; i++)
    {
        for (int j = 0; j <  2; j++)
        {
            printf("1 ");

        }
        printf("2 ");
        break;
    }
    printf("Out of loop");
}

Question Number 45

Name the three main parts of a for loop in C :

Question Number 46

Which is the function used to length of a string in C?

Question Number 47

What does the fread() function return?

Question Number 48

Free Edition of Visual Studio is,

Question Number 49

What is a binary stream in C?

Question Number 50

What is the green play button in the Visual studio does?

Question Number 51

Give the output of the following code snippet :
register int x;
void main()
{

    printf("%d", x);
}

Question Number 52

What is integrated into Visual Studio?

Question Number 53

How can an array of strings be represented as?

Question Number 54

Give the output of the following code snippet :


int main()
{
    int i;
    for(i=0; i< =6; i=1+2)
    {
        if(i <  3)
        {
            printf("Test1 ");
            continue;
        }
        else
        {
            printf("Test2");
            break;
        }
    }
    return 0;
}

Question Number 55

The steps to start a New Wizard in Visual Studio 2010 is,

Question Number 56

Give the output of the following code :
void main()
{
    char new1[]= { 0 };
    strcpy(new1,"Jello");
    int n=strlen(Jello);
    printf("%d ",n);
}

Question Number 57

Give the output of the following code snippet :
void main()
{
    int a=12;
    --a;
    if(a)
    {
    }
    printf("%d",a);
}

Question Number 58

Which of the following is not a logical operator in C ?

Question Number 59

Which keyword in C does not change the number of iterations which could have been executed by the condition?

Question Number 60

Give the output of the following code snippet :
struct point
{
    int x;
    int y;
};
struct point2
{
    int x;
    int y;
};
void fun(struct point);
int main()
{
    struct point2 p1 = {1, 2};
    fun(p1);
}
void fun(struct point p)
{
    printf("%d\n", p.x);
}

Question Number 61

Give the output of the following code snippet :
int main()
{
    int i=0;
    if(i--)
    {
        printf("%d",i++);
    }
    else
        printf("%d",--i);
    main();
}

Question Number 62

Which of the following are keywords in C:

Question Number 63

Give the output of the following code snippet :

void main()
{
    int i = 2;
    do
    {
        printf("Hi ");
    }
    while (i <  2)
    }

Question Number 64

Give the output of the following code snippet :
void main()
{
    int a=10;
    a--;
    switch(a)
    {
    case 10 :
        printf("%d",a);
        break;
    case 9  :
        printf("%d ",a++);
        printf("%d ",a);
    }
}

Question Number 65

What is the method used to pause an application at a particular point ?

Question Number 66

Give the output of the following code :
void main()
{
    int var = strcmp("Worlc","World");
    printf("%d", var);
}

Question Number 67

Give the output of the following code snippet :
void main()
{
    int i=0,j;
    for(i=-1,j=2; j< 5; j++)
    {
        if(j!=5)
            continue;
        else i++;
    }
    printf("%d",i);
}

Question Number 68

Which of the following are the user interfaces that help to debug a program with Visual Studio:

Question Number 69

Give the output of the following code snippet :
struct student
{
    int no;
}
void main()
{
    struct student s;
    s.no=10;
    printf("%d",no);
}

Question Number 70

Wizard in Visual studio is normally a set of,

Question Number 71

Which of the following statements is true about the fopen function?

Question Number 72

Give the output of the following code snippet :

void func(int a)
{
    int sum=0,x;
    while(a!=0)
    {
        x=a%100;
        sum+=(x+x+x);
        a=a/10;
    }
    printf("%d ",sum);
}
int main()
{
    func(1000);
    func(2222);
}

Question Number 73

Among all the files that make up a source program, how many times can an external variable be defined?

Question Number 74

Visual Studio is NOT

Question Number 75

The breakpoint pauses the execution

Question Number 76

Give the output of the following code snippet :
int func(int a)
{
    int b=10;
    return a+++ ++b;
}
int main()
{
    int x=5;
    int z=func(func(func(func(5))));
    printf("%d",z);
}

Question Number 77

Give the output of the following program :

void main()
{
    int a=5, b=10;
    if(a==5)&&if(b==10)
            printf("Values match");
}

Question Number 78

Give the output of the following code snippet :
int func()
{
    int i=10;
    if(i!=0)
        return 10;
    else
        return 20;
}
int main()
{
    int a=func();
    printf("%d",a);

}

Question Number 79

Give the output of the following code snippet :
struct Point
{
    int x;
    int y;
};

int main()
{
    struct Point p1 = {10, 20};
    struct Point p2 = p1;
    printf("%d %d",sizeof(p1),sizeof(p2));
}

Question Number 80

Give the output of the following code snippet :
void main( )
{
    float c;
    c = getchar( );
    printf( "\nYou entered: ");
    putchar( c );
}

Assume input as 2.45 :

Question Number 81

Versions of Visual Studio are,

Question Number 82

How many arguments are passed to the strcmp function for string manipulation in C?

Question Number 83

Find the output of the following program :
int main()
{
    char str[] = "Hello\0\World";
    printf("%s\n", str);
    return 0;
}

Question Number 84

Which of the following statements is true about Strings in C :

Question Number 85

Give the output of the following code snippet :
void func()
{
    int i=10;
    void func1()
    {
        int j=10;
        printf("%d",j);
    }
    func1();
    printf("%d",i);
}
int main()
{
    func();
}

Question Number 86

The main function in a given program cannot be called recursively. State true or false :

Question Number 87

Give the output of the following code snippet :
void main()
{
    int a=10;
    --a;
    switch(a--)
    {
    case 10 :
        printf("%d ",a);
        break;
    case 10*9/10  :
        printf("%d ",a++);
    case 11:
        printf("%d",a--);
        break;
    default:
        printf("Hello");
        break;
    }
}

Question Number 88

Which of the following are constituents of a C program :

Question Number 89

Give the output of the following code snippet :
int main()
{
    int a = 0, i = 0;
    for (i = 0; i <  5; i++)
    {

        continue;
        a++;
    }
    printf("%d",a);
}

Question Number 90

Which is NOT a Visual Studio edition.

Question Number 91

In which header file is the EOF character defined in C?

Question Number 92

Which of the following are parts of a function in C:

Question Number 93

Give the output of the following code snippet :
void main()
{
    int a=10;
    switch(a--)
    {
    case 10 :
        printf("%d ",a);
    case 9  :
        printf("%d ",a++);
        printf("%d ",a);
    }
}

Question Number 94

For a given C program, a function can be called :

Question Number 95

Give the output of the following code snippet :
void main()
{
    int i = 0;
    for (i = 0; i <  5; i++)
        if (i <  4)
        {
            printf("Ho ");
            break;
        }
}

Question Number 96

Visual Studio is NOT

Question Number 97

Which of the following parts of a function are required when calling a function:

Question Number 98

Give the output of the following code snippet :
void main()
{
    int i=0;
    do
    {
        i=i+3;
        printf("%d",i);
    }
    while(1);
}

Question Number 99

Give the output of the following code snippet :
struct student
{
    int id;
};
void main()
{
    struct student s[10];
    s.id[0] = 10;
    printf("%d", s.id[0]);
}

Question Number 100

Give the output of the following code snippet :
void main()
{
    struct employee
    {
        int id;
    };
    struct employee emp1= {20};
    printf("%d\t",emp1.id);
}

Question Number 101

Property of external variable to be accessed by any source file is called as

Question Number 102

Which of the following statements is true :

Question Number 103

Give the output of the following code snippet :
int func(int a*b)
{
    int i=10;
    if(i< =0)
        return a+10;
}
int main()
{
    float a=func(10*5+5);
    printf("%.2f",a);

}

Question Number 104

Which of the following is used to represent comments in C:

Question Number 105

Which of the following operators performs the same function of the logical AND operator?

Question Number 106

The steps to start a New Wizard in Visual Studio 2010 is,

Question Number 107

Given the following code snippet, find the output of the program :

void main()
{
    int a=5;

    switch(5)
    {
    case 1:
        printf("Value is 5");
        break;
    case 5:
        printf("Value is 1");
        break;
    }
}

Question Number 108

What is the number of values allowed for the character data type in C :

Question Number 109

Which of the following are the user interfaces that help to debug a program with Visual Studio:

Question Number 110

Give the output of the following code snippet:
struct p
{
    char c;
    float f;
};

int main()
{
    struct p x = {1,97,3};
    printf("%f \n", x.f);
}

Question Number 111

Give the output of the following code snippet :
int main()
{
    struct student
    {
        char name[25];
        int age;
    };
    struct student e;
    strcpy(e.name,"Jenn");
    e.age = 25;
    printf("%s %d\n", e.name, e.age);
    return 0;
}

Question Number 112

In which of the following ways can a structure variable be created?

Question Number 113

In which header file is the integer expression errno declared?

Question Number 114

Which of the following is NOT related to a Microsoft Development tool package?

Question Number 115

Which of the following can be called between a read and a write operation in a file?

Question Number 116

Give the output of the following code snippet :
void demo();
int main()
{
    demo();
    return 0;
}

void demo()
{
    printf("Hello ");

}

Question Number 117

Visual Studio is NOT

Question Number 118

Give the output of the following code snippet :
void func()
{
    int j=20;
    printf("%d",j);
}
void func()
{
    int i=10;
    printf("%d",i);
}
int main()
{
    func();
    func();
}

Question Number 119

Which of the keywords denote the scope of a variable in C :

Question Number 120

What is the value of the argument given to the character testing functions defined in ctype.h?

Question Number 121

Give the output of the following code snippet :
void main()
{

    int a;
    for(a=0; a< 5; a++)
    {
        if(a==2)
            break;
        printf("Hello world");
    }

}

Question Number 122

Give the output of the following code snippet :
struct test
{
    int k;
    char c;
    float f;
};
int main()
{
    struct test var = {5,80,2.0};
    printf("%c\n", var.c);
}

Question Number 123

Which of the keywords denote the scope of a variable in C :

Question Number 124

Give the output of the following code snippet :
struct p
{
    int k;
    char c;

};
int main()
{
    struct p x[5];
    x[0].k=10;
    x[0].c='a';
    printf("%d %d\n", x.k,x.c);
}

Question Number 125

Give the output of the following code snippet :
void main()
{
    int a=12,i=0;
    --a;
    i++;
    do
    {
        printf("%d",a);
        ++i;
    }
    while(--i);

}

Question Number 126

Give the output of the following code :
int main()
{
    int i=1;
    if(!i)
        printf("Hello,");
    else
    {
        i=0;
        printf("Jello");
        main();
    }
    return 0;
}

Question Number 127

Give the output of the following code snippet :
void main()
{
    int x=0,y=1,z=2;
    for(;;)
        printf("%d",x+y+z);
}

Question Number 128

The last element of the array arr[10] is accessed by :

Question Number 129

What is the range of the values allowed for the data type unsigned char in C:

Question Number 130

Give the output of the following code snippet :
void main()
{
    int a=10;
    a--;
    switch(a)
    {
    case 10 :
        printf("%d",a);
        break;
    case 9  :
        printf("%d",a++);
        break;
        printf("%d",a);
    }
}

Question Number 131

The keyword 'break' cannot be used within :

Question Number 132

Give the output of the following code snippet :
int i=10;
int func(int x)
{
    i++;
    return ++i;

}
int func2(int y)
{
    --i;
    return --i;
}
void main()
{
    int a=func(i);
    int b=func2(i);
    printf("%d",a+b);
}

Question Number 133

Which of the following statements is true about the remove() function?

Question Number 134

Which of the following statements is true by the Call by value method?

Question Number 135

Give the output of the following code snippet : Assume the input as 100
void main()
{
    int x=0,z;
    z=printf("%d ",scanf("%d ",&x));
    printf("%2d",z);
}

Question Number 136

Which mode is used to denote opening the binary file for update where the writing is done at the end?

Question Number 137

Which of the following is a ways can be used to represent an array of Strings in C?

Question Number 138

Which is the function used to copy a particular string into an array in C?

Question Number 139

What are the two ways in which the arguments can be passed to a function?

Question Number 140

Which of the following are not features of Debugging with Visual Studio :

Question Number 141

Which of the following are the user interfaces that help to debug a program with Visual Studio:

Question Number 142

Consider the given C code:
main()
{
    int val=30;
    float val1=3.15;
    printf("Welcome to the test");
}

Identify the literals in the program

Question Number 143

Give the output of the following code snippet :
void main()
{
    char new1[]="Hi";
    for(int i=0; i< 3; i++)
    {
        printf("%d  ",new1[i]);
    }
}

Question Number 144

Give the output of the following code snippet :
int func2()
{
    int j=100;
    return ++j;
}
void func()
{
    int i=10;
    int j=func2();
    printf("%d",i+j);
}
int main()
{
    func();
}

Question Number 145

Following is a challenge with Visual studio for a beginner,

Question Number 146

Give the output of the following code snippet :
void func()
{
    int i=1;
    while(!i)
    {
        func();
    }
    printf("%d",i++);
}
void main()
{
    func();
}

Question Number 147

How many arguments does the fclose() function take?

Question Number 148

Identify the general syntax of the conditional operator in C :

Question Number 149

Development tools are normally NOT used for,

Question Number 150

Which of the keywords denote the size and type of a variable in C :

Question Number 151

Give the output of the following code snippet :
void main()
{
    int i=0;
    for(;; i++)
    {
        i=i+3;
        if(i==12)
            continue;
        else
            break;
    }
    printf("%d",i);
}

Question Number 152

Give the output of the following code snippet :
struct p
{
    int k;
    char c;

};
int main()
{
    struct p x = {10,1};
    x.k=5;
    printf("%d %d\n", x.k,x.c);
}

Question Number 153

Give the output of the following code snippet :
int func()
{
    int i=10;
    if(i!=0)
        return 10.50;
    else
        return 20.75;
}
int main()
{
    float a=func();
    printf("%.2f",a);

}

Question Number 154

What are the arguments passed to the fwrite() function?

Question Number 155

Give the output of the following code snippet :
int func(int a,int b)
{
    int z=a >= b?return ((a= a/b): (a=20%10)) ;
}
int main()
{
    int a,b;
    a=func(100,250);
    b=func(20,20);
    printf("%d %d",a,b);
}

Question Number 156

Give the output of the following code snippet :
int main()
{
    int a = 10, b;
    a >=5 ? b=100: b=200;
    printf("%d\n", b);
    return 0;
}

Question Number 157

Development tools are normally NOT used for,

Question Number 158

Give the output of the following code snippet :
struct point
{
    int x;
    int y;
};
struct point2
{
    int x;
    int y;
};
int main()
{
    struct point p = {1};
    struct point2 p1 = p;
    printf("%d\n", p1.x);
}

Question Number 159

Which of the following characters are printed by the ispunct() function defined in ctype.h?

Question Number 160

Give the output of the following code snippet :
void func(int a)
{
    int sum=0,x;
    while(a!=0)
    {
        x=a%10;
        sum+=(x*x);
        a=a/10;
    }
    printf("%d ",sum);
}
int main()
{
    func(100);
    func(200);
}

Question Number 161

Platforms and software supported by Visual Studio are,

Question Number 162

Give the output of the following code snippet :
void main()
{
    int i=0;
    do
    {
        printf("%d",i);
        i++;
    }
    while(i);
}

Question Number 163

How many arguments does the getchar() function take?

Question Number 164

Which is the header file used to help manipulate strings in C?

Question Number 165

Which of the following is the default method to pass arguments in C?

Question Number 166

Which of the following is an example of loop in C?

Question Number 167

In C, a function can be called from :

Question Number 168

What is Visual Studio?

Question Number 169

Which of the following gives the memory address of the first element in array arr, an array with 10 elements?

Question Number 170

What are the two arguments that are passed to the strcpy function for string manipulation in C?

Question Number 171

Consider the following code snippet and give the output of the program :
main()
{
    int  a=12;
    if(a==12);
    printf("Input 1");
    else
        printf("Input other");
}

Question Number 172

Which of the keywords denote the scope of a variable in C :

Question Number 173

Give the output of the following code :
void fun (int)
{
    printf("Hello");

}
void main()
{
    fun();
}

Question Number 174

Which of the following functions is used to set the file position for the stream?

Question Number 175

Which keyword can be used for exiting recursion?

Question Number 176

Give the output of the following code snippet :
void main()
{
    float x=0.3;
    float y=0.3;
    if(x==y)
        printf("%f",x+y);
    else
        printf("%f",x-y);
}

Question Number 177

Give the output of the following code snippet :
void Test();
void main()
{
    int k = Test();
    printf("%d", k);
}
void Test()
{
    printf("Hello ");
}

Question Number 178

Which mode is used to denote opening the text file for update but discards any previous contents if any?

Question Number 179

Give the output of the following code snippet :
struct p
{
    int mark1,mark2;
};

int main()
{
    struct p x = {50,50,50};
    printf("%d %d\n",x.mark1,x.mark2);
}

Question Number 180

Debugging allows you to :

Question Number 181

Give the output of the following code snippet :
struct
{
    int no;
}
void main()
{
    struct s;
    s.no=10;
    printf("%d",no);
}

Question Number 182

Development tools are normally NOT used for,

Question Number 183

Which of the following statements is true about an escape sequence in C?

Question Number 184

Visual studio supports

Question Number 185

Give the output of the following code snippet :
int main()
{
    int i;
    for (i = 1; i !=6; i += 2)
        printf("Ho ");
    return 0;
}

Question Number 186

Give the output of the following code snippet :
struct p
{
    int k;
    char c;

};
int main()
{
    struct p x[5];
    x[0].k=10;
    x[0].c='B';
    printf("%d %c\n", x[1].k,x[1].c);
}

Question Number 187

Give the output of the following code snippet :
int main()
{
    for(int i=0; i< =4; i++)
    {
        printf("%d ",i);
    }

    return 0;
}

Question Number 188

Which of the following statements is true about UNICODE?

Question Number 189

Give the output of the following code snippet :
void main()
{
    static double x;
    int x;
    printf("x is %d", x);
}

Question Number 190

Give the output of the following code snippet :
void main()
{
    int i;
    for(i=0; i< =4; i++)
    {
        printf("%d",i);
        break;
        printf(" Test1");
    }
    printf(" Test2");
}

Question Number 191

Give the output of the following code snippet :
void main()
{
    int i=0;
    do
    {
        i=i+3;
        i++;
        printf("%d",i);
    }
    while();
}

Question Number 192

Visual Studio has

Question Number 193

Which of the keywords denote the size and type of a variable in C :

Question Number 194

Which mode is used to denote opening the binary file for writing, where the writing is done at the end?

Question Number 195

Consider the given code snippet in C. What is the output of the program?
int a1=10;
void main()
{


    printf("%d",a1);
    printf("      %d",b1);


}

int b1=12;

Question Number 196

Give the output of the following code snippet :
void main()
{
    char new1 ='c';
    if(( new1 =='C') || (new1 =='c'))

        printf("Same");
    else
        printf("Not Same");

}

Question Number 197

Consider the given code snippet :

int main()
{
    int i = 0;
    while (i <  3)
        i++;
    printf("In while loop\n");
}

How many times is the value of 'i' checked in the condition i <  3?

Question Number 198

Give the output of the following code snippet :
int func(int a)
{
    int b=0,i=0;
    a=b;
    while(a!=0)
    {
        a--;
        b--;
        func(b);
    }
    printf("%d %d",a,b);
    return 0;
}
int main()
{
    int x=5;
    func(x);
}

Question Number 199

Give the output of the following code :
void main()
{
    int var = strcmp("Hello","World");
    printf("%d", var);
}

Question Number 200

Automatic variables are variables that are

Question Number 201

What is the return type of the character testing functions defined in ctype.h?

Question Number 202

Give the output of the following code snippet :
int func(int a,int b)
{
    int i=100;
    if(i++< =100)
        return 20;
    else
        return 30;
}
int main()
{
    int z=func(100,200);
    printf("%d  ",z);
    printf("%p",main);
}

Question Number 203

Give the output of the following code :

struct p
{
    int k;
    char c;

};
int main()
{
    struct p x = {0,1};
    x.k=10;
    printf("%d %d\n", x.k,x.c);
}

Question Number 204

Give the output of the following code snippet :
union student
{
    int no;
    float no1;
    double no2;
};
void main()
{
    union student s;
    s.no=1001;
    printf("%d",sizeof(s));
}

Question Number 205

The arguments to a function in C are enclosed within

Question Number 206

Visual studio supports

Question Number 207

Give the output of the following code snippet :

void main()
{
    int a=1;
    if(!a)
        printf("Value is not 1");
    else
        printf("Value is 1");
}

Question Number 208

How many arguments are passed to the strcpy function for string manipulation in C?

Question Number 209

Which of the keywords denote the size and type of a variable in C :

Question Number 210

Give the output of the following code snippet :
void main()
{
    int x=0,z;
    float p=2.4567;
    float q=5.6543;
    float r=0.0;
    printf("%.2f",p+q-r);
}

Question Number 211

What does the fclose() function take as the argument?

Question Number 212

What is the unsigned integral produced by the sizeof operator?

Question Number 213

Consider the given code snippet in C. In which functions can the variable b1 be accessed?
void hello();
int a1=10;
void main()
{


    printf("%d",a1);

    hello();

}

int b1=12;
void hello()
{
    printf("%d",b1);
}

Question Number 214

Give the output of the following code snippet :
void main()
{
    int a=10;
    switch(a)
    {
    case 10 :
        printf("%d",a);
        continue;
    case a:
        printf("%d",a++);
        break;
        printf("%d",a);
    }
}

Question Number 215

Platforms and software supported by Visual Studio are,

Question Number 216

Which of the following are constituents of a C program :

Question Number 217

Which mode is used to denote opening the text file for update?

Question Number 218

In the while loop, how many times is the loop executed if the condition is false?

Question Number 219

Which of the keywords denote the size and type of a variable in C :

Question Number 220

Which of the following statements is true about a minimal function in C?

Question Number 221

Which is the function used to concatenate two strings in C?

Question Number 222

Give the output of the following code snippet :
void main()
{
    char arr[11]="The African";
    printf("%s",arr);

}

Question Number 223

Identify the type of error in the given code :

void main()
{
    printf("Hello world");
    printf(Test);
}

Question Number 224

Which of the following is a valid string definition?

Question Number 225

What are the types of functions that can be used in C?

Question Number 226

Give the output of the following code snippet :

void main()
{

    printf("Welcome");
    goto L2 ;

L1:

    printf("Loop 1");

L2:

    printf("Loop2");

    goto L1;
}

Question Number 227

Which of the following modes is the temporary file opened in?

Question Number 228

Give the output of the following code snippet :

void main()
{

    int a=50;
    if(a>10)
        printf("First");
    else if(a>20)
        printf("Second");
    else if(a>30)
        printf("Third");

}

Question Number 229

Which is the function key in VS is associated with stepping out of the function while debugging?

Question Number 230

Which of the following is a valid syntax for the function freopen()?

Question Number 231

Boiler Plate code is auto-generated in Visual Studio by,

Question Number 232

Give the output of the following code snippet :
int func(int,float);
int main()
{
    float a,b;
    a=func(100,250.5);
    b=func(20,20.75);
    printf("%.2f %.2f",a,b);
}
int func(int a,float b)
{
    return ((float)a+b);
}

Question Number 233

Which library function in C is used to print a single character every time it is called?

Question Number 234

Give the output of the following code snippet :
int main()
{
    int i = 0;
    do
    {
        i++;
        printf("Ho ");
    }
    while (i <  3);
}

Question Number 235

The default statement in a switch case statement is optional and can be skipped. State true or false:

Question Number 236

Versions of Visual Studio are,

Question Number 237

Give the output of the following code snippet :
void main()
{
    struct employee
    {
        int id=10;
    };
    struct employee emp1= {20};
    printf("%d\t",emp1.id);
}

Question Number 238

Give the output of the following code snippet :

int main()
{
    int i,j,k;
    for(i=0,j=2,k=1; i< =4; i++)
    {
        printf("%d ",i+j+k);
    }
    return 0;
}

Question Number 239

Give the output of the following code snippet :

void main()
{
    int i;
    for(i=0; i< =6; i=1+2)
    {
        if(i <  3)
        {
            continue;
            printf("Test1 ");
        }
        else
        {

            break;
            printf("Test2");
        }
    }

}

Question Number 240

Give the syntax for an if-else/if-else if statement :

Question Number 241

Which of the keywords denote the size and type of a variable in C :

Question Number 242

Give the output of the following code snippet :
void main()
{
    int a=13,b=20;
    if(!a!=b)
        printf("%d",++a);
    else
        printf("%d",--b);
}

Question Number 243

Give the output of the following code snippet :
int main()
{
    int i;
    for (i = 1; i != 5; i += 2)
        printf("Ho ");
    return 0;
}

Question Number 244

Give the output of the following code snippet :
void main()
{
    int i=0;
    int sum=0;
    do
    {
        printf("%d",i);
        sum+=i;
    }
    while(i=1);
}

Question Number 245

Consider the given example of a function declaration in C. State which of the following is valid.

Question Number 246

Give the output of the following code snippet :
struct p
{
    int k;
    char c[10];
    float f;
};
int p = 10;
int main()
{
    struct p x = {1,"Hello"};
    printf("%s %d\n", x.c, p);
}

Question Number 247

Visual Studio has

Question Number 248

Which mode is used to denote opening the binary file for update but discards any previous contents if any?

Question Number 249

What is the return-type of the function sqrt() in C?

Question Number 250

Give the output of the following code snippet : Assume the contents of the file 'Test.txt' is "Hello World".
void main()
{
    char x;
    FILE *fp;
    fp=fopen("Test.txt","r");
    while((x=getc(fp))!=EOF)
        printf("%c",x);
    printf("%d",EOF);
    fclose(fp);
}

Question Number 251

Give the output of the following code snippet :
void main()
{
    struct temp
    {
        int a;
        char b;
        struct temp1
        {
            char c;
        } p;
    };
    struct temp t1 = {10,'A','e'};

    printf("%d %c %c ",p.a,p.b,p.c);
}

Question Number 252

Give the output of the following code snippet :

int main()
{
    int i;
    int arr[3] = {0};
    for (i = 0; i < = 3; i++)
        printf("%d ", arr[i]);
    return 0;
}

Question Number 253

Which of the following are file positioning functions in C?

Question Number 254

Which of the following is a valid initialization of a multidimensional array?

Question Number 255

Give the output of the following code snippet :
int main()
{
    int i=0;
    for(i=0; i< 5; i++)
    {
        if(i==3)
            return 0;
        printf("Ho");
    }
    printf("Hello world");

}