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

Give the output of the following code snippet :

int main()
{
    register static int i = 10;
    i = 11;
    printf("%d\n", i);
}

Question Number 2

Which of the following is true for static variable?

Question Number 3

Which of the following are constituents of a C program :

Question Number 4

What is Integrated into Visual Studio?

Question Number 5

Give the output of the following code snippet :
void main()
{
    int a=300,b=20,c=50;
    if(a % b == c % 2)
        a=10;
    else
        c=40;
    a=50;
    printf("%d %d %d",a,b,c);
}

Question Number 6

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

Question Number 7

Give the output of the following code snippet :
void main( )
{
    printf("Hello,
           World ");
}

Question Number 8

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 9

Which of the following modes is used to indicate full buffering in the setvbuf() function?

Question Number 10

Which of the following functions flushes all the output streams?

Question Number 11

If two strings are identical, then what does the strcmp() function return?

Question Number 12

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

Question Number 13

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

Question Number 14

When is the condition statement in a for loop checked in C?

Question Number 15

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 16

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 17

Name the feature used in Visual Studio to help debugging.

Question Number 18

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

Question Number 19

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

Question Number 20

Versions of Visual Studio are,

Question Number 21

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

Question Number 22

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

Question Number 23

Which of the following functions control the buffering of the stream?

Question Number 24

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 25

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

Question Number 26

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

Question Number 27

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

Question Number 28

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 29

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

    return 0;
}

Question Number 30

Give the output of the following code snippet :

void main()
{
    char new1[]= { 0 };
    strcpy(new1,"Jello");
    char new2[]= { 0 };
    strcpy(new2,"Yellow");
    char new3[]= { 0 };
    strcat(new3,new1);
    strcat(new3,new2);
    printf (new3);
}

Question Number 31

Give the output of the following code snippet :
void main()
{
    int x=25,y=1;
    do
    {
        if(x>5)
            printf(" One");
        else if(x>10)
            printf(" Two");
        else
            printf(" Three");
    }
    while(y--);
}

Question Number 32

Which of the following statements is true about structures in C?

Question Number 33

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 34

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

Question Number 35

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

Question Number 36

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 37

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

Question Number 38

Give the output of the following code snippet :
void countFun ( int count )
{

    if ( count < = 5 )
    {
        printf(" %d ", count);
        countFun( count + 1 );
    }
}
int main()
{
    countFun ( 2 );
}

Question Number 39

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

Question Number 40

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

Question Number 41

Which of the following statements are used to alter the flow of control in a C program :

Question Number 42

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 43

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

Question Number 44

Name the looping statements available in C :

Question Number 45

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

Question Number 46

Which function causes the buffered but unwritten data to be written to the file on an output stream C?

Question Number 47

Which of the following are file positioning functions in C?

Question Number 48

Debugging allows you to :

Question Number 49

Give the output of the following snippet :
struct student
{
    int no = 5;
    char name[20];
};
void main()
{
    struct student s;
    s.no = 8;
    printf("Hello");
}

Question Number 50

Which of the following statements are used to alter the flow of control in a C program :

Question Number 51

Breakpoints allow you to :

Question Number 52

Breakpoints allow you to :

Question Number 53

Give the output of the following code snippet :

void main()
{
    static int x;
    printf("x is %d", x);
}

Question Number 54

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 55

Which function is used to position the stream at the position recorded by fgetpos() function?

Question Number 56

When is the increment statement(s) of the for loop executed?

Question Number 57

Give the output of the following code snippet when the file 'Test.txt' is not available :
void main()
{
    char x;
    FILE *fp;
    fp=fopen("Test.txt","r");
    if(fp==NULL)
    {
        printf("Fail");
        exit(0);
    }
    fclose(fp);
}

Question Number 58

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

Question Number 59

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 60

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

Question Number 61

Give the output of the following code snippet :
void test();
void main()
{
    test();
    test();
}
void test()
{
    static int x = 5;
    x++;
    printf("%d", x);
}

Question Number 62

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);
}

Question Number 63

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

Question Number 64

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

Question Number 65

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 66

Following is a challenge with Visual studio for a beginner,

Question Number 67

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

Question Number 68

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

Question Number 69

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

Question Number 70

Give the output of the following code :
struct p
{

    char c;
    float f;
};

int main()
{
    printf("%c %f \n", c, f);
}

Question Number 71

Give the output of the following C code:
void hello()
{
    printf("Welcome");
}


void main()
{
    hello();
    printf("I repeat");
    hello();
}

Question Number 72

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

Question Number 73

Versions of Visual Studio are,

Question Number 74

Name the looping statements available in C :

Question Number 75

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

Question Number 76

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

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

Question Number 77

Name some of the problems associated with goto statement :

Question Number 78

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

Question Number 79

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

Question Number 80

Give the output of the following code snippet :

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

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

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

Question Number 81

If the return type of a function is not mentioned, what is its default return type?

Question Number 82

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

Question Number 83

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 84

Identify the type of error in the given code :

void main()
{
    int a = 10;
    {
        printf("Hello world");

        printf("%d",a);
    }

Question Number 85

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 86

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

Question Number 87

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

Question Number 88

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 89

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

Question Number 90

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

Question Number 91

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

Question Number 92

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 93

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

Question Number 94

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

Question Number 95

A function in C cannot return more than one value at once. State true or false :

Question Number 96

The conditional operator can be used to replace which condition statement in C?

Question Number 97

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

Question Number 98

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

Question Number 99

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

Question Number 100

A function can be used as a parameter for another function. State true or false :

Question Number 101

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

    }
    printf("%d",i);

    return 0;
}

Question Number 102

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 103

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

Question Number 104

Breakpoints allow you to :

Question Number 105

Which of the following is a valid array declaration in C ?

Question Number 106

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

Question Number 107

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

Question Number 108

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 109

Give the output of the following code snippet :

int main()
{
    for (int i = 0; i < 1; i++)
        printf("In the loop");
}

Question Number 110

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 111

When the breakpoint is placed at a particular line, the execution of the code is :

Question Number 112

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

Question Number 113

Give the output of the following code snippet :

void main( )
{
    int c;
    c = getchar( );
    printf( "\nYou entered: ");
    putchar( c );
}

Assume input as 6 :

Question Number 114

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 115

Versions of Visual Studio are,

Question Number 116

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

Question Number 117

Which of the following are constituents of a C program :

Question Number 118

What is a text stream in C?

Question Number 119

In C, if you pass an array as an argument to a function, what actually gets passed?

Question Number 120

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

Question Number 121

Which of the following functions are required to access and create a file in C?

Question Number 122

Wizard in Visual studio is normally a set of,

Question Number 123

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

Question Number 124

What is integrated into Visual Studio?

Question Number 125

Which is a Visual Studio edition.

Question Number 126

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 127

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

Question Number 128

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

Question Number 129

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

Question Number 130

Give the output of the following code snippet :
void main()
{
    int a=12;
    --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 131

Visual Studio has

Question Number 132

Name the function key associated with setting up a breakpoint in VS :

Question Number 133

Which of the following statements is an example of an array initialization in C?

Question Number 134

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

Question Number 135

Which library function in C is used to read a single character from the text stream and returns its value?

Question Number 136

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

Question Number 137

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 138

What is the use of the compiler error code when an error occurs in a C program in VS?

Question Number 139

When a program begins execution, which of the following streams are open?

Question Number 140

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

Question Number 141

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

Question Number 142

Which of the following is not a debugger :

Question Number 143

If the fopen() function is not able to open a file, then what does it return?

Question Number 144

How many arguments does the getchar() function take?

Question Number 145

How many arguments does the function fopen() take?

Question Number 146

Wizard in Visual studio is normally a set of,

Question Number 147

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

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


}

Question Number 148

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 ",t1.a,t1.b,p.c);
}

Question Number 149

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

Question Number 150

Which of the following statements is true about the EOF character in C?

Question Number 151

A function in C must always return a value. State true or false :

Question Number 152

Which function prints an error message corresponding to integer in errno ?

Question Number 153

Give the output of the following code snippet :
void main()
{
    int arr[10]= {5};
    printf("%d %d",arr[1],arr[9]);
}

Question Number 154

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 155

Give the output of the following program :
struct emp
{
    char n[10];
    int age;
};

void main()
{

    struct emp e1 = {"Hello", 23};
    struct emp e2 = e1;
    printf("%s\n", e2.n);

}

Question Number 156

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

Question Number 157

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

Question Number 158

In which header file is the integer expression errno declared?

Question Number 159

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

Question Number 160

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

Question Number 161

Which of the following correctly accesses the seventh element stored in arr, an array with 10 elements?

Question Number 162

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 163

Following is a challenge with Visual studio for a beginner,

Question Number 164

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

Question Number 165

For a 32 bit float number with 6 significant bits, the magnitude lies between :

Question Number 166

Write the given if else statements using conditional operator in C :
if (x <  y)
{
    min = x;
}
else
{
    min = y;
}

Question Number 167

Which of the following are constituents of a C program :

Question Number 168

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

Question Number 169

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

Question Number 170

Which among the following is the correct syntax to declare a variable as static and register?

Question Number 171

Identify the type of error in the given code :

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

Question Number 172

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

Question Number 173

What is the return type of the getchar() function?

Question Number 174

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

Question Number 175

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

Question Number 176

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

}

Question Number 177

The function declaration in C provides information to the compiler about :

Question Number 178

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

Question Number 179

Give the output of the following code snippet :

int main()
{
    int i;
    for(i=0; i< =6; i++)
    {
        if(i <  3)
            continue;
        else
            printf("Test");
        break;

    }
    return 0;
}

Question Number 180

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 181

Give the output of the following code :
int main()

{
    int i=5;
    while(i)

    {
        printf("Hello world");
    }
    return 0;
}

Question Number 182

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

Question Number 183

What are the functions that are available to manipulate strings in C?

Question Number 184

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 185

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

Question Number 186

Give the output of the following code snippet :
int func()
{
    return (double)5.0;
}
void main()
{

    printf("%d", func());
}

Question Number 187

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

Question Number 188

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

Question Number 189

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 190

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

Question Number 191

What is the unsigned integral produced by the sizeof operator?

Question Number 192

Give the output of the following code snippet :
int func(int x)
{
    int y=x++;
    return x*y;
}
void main()
{
    int a=2;
    int b=1;
    int c=a*b+func(a)*func(b);
    printf("%d",c);
}

Question Number 193

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

Question Number 194

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);
    fclose(fp);
}

Question Number 195

Give the output of the following code snippet :
int main()
{
    FILE *fp1,*fp2;

    fp1=fopen("day.text","r");
    fp2=fopen("night.txt","r");
    fclose(fp1,fp2);
    return 0;
}

Question Number 196

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

Question Number 197

The breakpoint pauses the execution

Question Number 198

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

Question Number 199

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

Question Number 200

Which keyword can be used for exiting recursion?

Question Number 201

Which of the following statements are true about recursion?

Question Number 202

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

Question Number 203

What is a binary stream in C?

Question Number 204

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 205

Which of the following is a storage specifier?

Question Number 206

Which of the following functions are available in the header file string.h in C?

Question Number 207

According to the presenter, to overcome the learning curve with Visual Studio, with ease, it’s better to

Question Number 208

Give the output of the following code snippet :

void main()
{
    int n;
    for (n = 4; n!=0; n--)
        printf("%d ", n--);

}

Question Number 209

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

Question Number 210

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

Question Number 211

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 212

Give the output of the following code snippet :

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

Question Number 213

Give the output of the following code snippet : Assume the contents of the file 'Test.txt' is "Hello World".
void main()
{
    FILE *fp,*fp1;
    char x[20];
    fp = fopen("Test.txt","r");
    char i=0;
    while(i=fgetc(fp)!=NULL)
    {
        printf("%c",i);
    }
    fclose(fp);

}

Question Number 214

Boiler plate code is auto-generated in Visual Studio by

Question Number 215

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 216

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

Question Number 217

Give the output of the following code snippet :

void main()
{
    int k;
    for (k = -3; k <  -5; k++)
        printf("Hello");
}

Question Number 218

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

Question Number 219

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

}
void main()
{
    fun();
}

Question Number 220

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 221

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

Question Number 222

The nth element of an array arr[n] of n values is accessed by:

Question Number 223

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

Question Number 224

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

Question Number 225

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

Question Number 226

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

Question Number 227

Which of the following is a two dimensional array in C :

Question Number 228

Give the output of the following code snippet :
void main()
{
    char i='d';
    if((i=='d') && (i=='D'))
        printf("Values match");
    else
        printf("No match");
}

Question Number 229

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

Question Number 230

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

Question Number 231

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

Question Number 232

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

Question Number 233

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

Question Number 234

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

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

Question Number 235

Give the output of the following code snippet :
struct student
{
    char c[10];
};
void main()
{
    struct student s;
    printf("%d", sizeof(s));
}

Question Number 236

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

Question Number 237

Which of the following statements is true with regards to the break statement :

Question Number 238

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

Question Number 239

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

Question Number 240

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 241

Give the output of the following code snippet :

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

}

Question Number 242

The rewind(fp) function is equivalent to which of the following functions?

Question Number 243

Give the output of the following code :
struct student
{
    int no;
    char name[20];
};

void main()
{

    struct student s;
    no = 8;
    printf("%d", no);
}

Question Number 244

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

Question Number 245

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

Question Number 246

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

Question Number 247

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

Question Number 248

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

Question Number 249

Give the output of the following code snippet :
void main()
{
    char str[]="HelloWorld";
    int z=10*3+5-4;
    if(z< 10)
        printf("%s",str);
    else
        printf("%20s",str);

}

Question Number 250

Visual Studio has

Question Number 251

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,*fp1;
    fp=fopen("Test.txt","w+");
    fputc('S',fp);
    fclose(fp);
    fp1=fopen("Test.txt","r");
    while((x=getc(fp1))!=EOF)
    {
        printf("%c",x);
    }
    fclose(fp1);
}

Question Number 252

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

Question Number 253

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

Question Number 254

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

Question Number 255

What is the total length of the string containing n characters in C?