Knowledge check.

- Choose one best answer from given 4 choices for each questions.
- Review before submitting, as you won't get a chance to review after submitting.
- 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 true about Strings in C :

Question Number 2

Name the type of errors that occur due to a missing semi-colon(;) in a C program:

Question Number 3

Platforms and software supported by Visual Studio are,

Question Number 4

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

Question Number 5

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

}

Question Number 6

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 7

Which of the following is a valid string definition?

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 library function in C is used to print a single character every time it is called?

Question Number 10

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

Question Number 11

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 12

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

Question Number 13

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 14

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 15

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 16

Which of the following are examples of built in functions?

Question Number 17

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 18

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 19

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 20

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 21

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

Question Number 22

What is the general syntax of a function which is declared in C?

Question Number 23

Give the output of the following code snippet :

int main()
{
    int i = 0;
    do
    {
        i++;
        if (i == 2)
            continue;
        printf("In the loop ");
    }
    while (i <  2);
    printf("%d\n", i);
}

Question Number 24

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

Question Number 25

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

Question Number 26

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 27

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

Question Number 28

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 29

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

Question Number 30

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

Question Number 31

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

Question Number 32

Which of the following are keywords in C:

Question Number 33

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 34

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 35

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



void main()
{
    int a=5;

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

Question Number 36

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 37

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 38

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

Question Number 39

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 40

Which of the following are keywords in C:

Question Number 41

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 42

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

Question Number 43

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

Question Number 44

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;
    if (p1.x == p2.x)
        printf("p1 and p2 are same ");
}

Question Number 45

What is a text stream in C?

Question Number 46

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

Question Number 47

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 48

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 49

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 50

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

Question Number 51

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

Question Number 52

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 53

A function cannot have more than one return statement. State true or false :

Question Number 54

Which of the following statements indicate the general nature of computer programs?

Question Number 55

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

Question Number 56

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

Question Number 57

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

Question Number 58

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

Question Number 59

What is Visual Studio?

Question Number 60

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 61

How many times is the initialization part of the for loop carried out?

Question Number 62

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

Question Number 63

Give the output of the following code snippet :

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

}

Question Number 64

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 65

Identify the general syntax of the conditional operator in C :

Question Number 66

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

Question Number 67

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

Question Number 68

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 69

Which of the following is not a debugger :

Question Number 70

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

Question Number 71

Visual studio supports

Question Number 72

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 73

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 74

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

Question Number 75

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

Question Number 76

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 77

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

Question Number 78

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

Question Number 79

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

Question Number 80

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

Question Number 81

What does the fread() function return?

Question Number 82

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

Question Number 83

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

Question Number 84

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 85

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

Question Number 86

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

Question Number 87

Give the output of the following code snippet :
int sub(int a, int b)
{

    if(a>b)
        return a-b;
    else
        return b-a;


}
int main()
{
    printf("%d", sub(10,20));
}

Question Number 88

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

Question Number 89

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 90

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

Question Number 91

Which of the following is a debugger :

Question Number 92

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;
    if (p1 == p2)
        printf("p1 and p2 are same ");
}

Question Number 93

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

Question Number 94

Give the output of the following code snippet :
void main()
{
    int a = 10, b, c;

    if(a >= 50)
        b = 20;
    c = 30;
    printf("%d, %d, %d\n", a, b, c);
}

Question Number 95

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 96

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 97

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

Question Number 98

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

Question Number 99

The arguments to a function in C are enclosed within

Question Number 100

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

Question Number 101

Give the output of the following code snippet :
void main()
{
    int a=12,i=1;
    int n2=printf("%d",a);
    for(; n2!=2;)
    {
        printf("%d",--i);
    }

}

Question Number 102

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

Question Number 103

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

    int n=strlen(new1);
    printf("Length : %d ",n);
}

Question Number 104

Name the looping statements available in C :

Question Number 105

Find the output of the code snippet :
void main()
{
    int arr[10]= {10,2.5,3,5.5};
    for(int i=0; i< 5; i++)
        printf("%d  ",arr[i]);
}

Question Number 106

Debugging allows you to :

Question Number 107

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

Question Number 108

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

Question Number 109

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

Question Number 110

Give the output of the following code :
struct p
{

    char c;
    float f;
};

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

Question Number 111

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

Question Number 112

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

Question Number 113

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

Question Number 114

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 115

Wizard in Visual studio is normally a set of,

Question Number 116

How many arguments does the fclose() function take?

Question Number 117

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

Question Number 118

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 119

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

Question Number 120

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

Question Number 121

Visual Studio is NOT

Question Number 122

Give the output of the following code snippet :

void fun()
{
    return 1;
}
void main()
{
    int x = 0;
    x = fun();
    printf("%d", x);
}

Question Number 123

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

Question Number 124

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

Question Number 125

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[0].k,x[0].c);
}

Question Number 126

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

Question Number 127

What is the escape sequence used to denote a tab space in C?

Question Number 128

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

Question Number 129

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

Question Number 130

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 131

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

Question Number 132

Give the output of the following code snippet :
int m();
void main()
{
    int k = m();
    printf("%d", k);
}
int m()
{
    int a[2] = {5, 8};
    return a[0];
}

Question Number 133

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

Question Number 134

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

Question Number 135

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 136

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 137

Name some of the basic errors that may occur during compilation of a C program :

Question Number 138

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

    for(i=1; i< =3; i++)
    {
        printf("Ho ");
    }
    printf("%d",i);

    return 0;
}

Question Number 139

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

Question Number 140

Some of the ways in which looping can be carried out in C is :

Question Number 141

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

Question Number 142

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 143

What is the output of the given code if the file 'Test.txt' is not present?
void main()
{
    char x;
    FILE *fp;
    fp=fopen("Test.txt","r");
    while((x=getc(fp))!=EOF)
        printf("%c",x);
    printf("\n");
    fclose(fp);
}

Question Number 144

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

Question Number 145

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

Question Number 146

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 147

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

Question Number 148

What is Visual Studio?

Question Number 149

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

Question Number 150

Give the output of the following code snippet :

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

Question Number 151

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

Question Number 152

Which is NOT a Visual Studio edition.

Question Number 153

Which of the following are file positioning functions in C?

Question Number 154

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 155

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 156

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

Question Number 157

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 158

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

Question Number 159

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

}

Question Number 160

Breakpoints do not allow you to :

Question Number 161

Which of the following are file positioning functions in C?

Question Number 162

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

Question Number 163

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

Question Number 164

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 165

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

Question Number 166

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

Question Number 167

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

Question Number 168

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

Question Number 169

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 170

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

Question Number 171

Name the feature used in Visual Studio to help debugging.

Question Number 172

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

Question Number 173

Give the output of then following code snippet :

int main()
{
    int x,y=5;
    for(x=0; x< 3; x++)
        if(y>=5)
            printf(" %d",x);
    return 0;
}

Question Number 174

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 175

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

Question Number 176

What is Visual Studio?

Question Number 177

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

Question Number 178

Which keyword can be used for exiting recursion?

Question Number 179

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

Question Number 180

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

Question Number 181

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

Question Number 182

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

Question Number 183

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 184

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 185

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

Question Number 186

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 187

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

Question Number 188

Give the output of the following program :
int fun(int i)
{
    i++;
    return i;
}

int main()
{
    int fun(int);
    int i=3;
    fun(i=fun(fun(i)));
    printf("%d\n", i);
    return 0;
}

Question Number 189

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

Question Number 190

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

Question Number 191

Give the output of the following code snippet :
int main()
{
    int a = 1;
    switch(a)
    {
    case 1:
        printf("First");

    case 2:
        printf("Second");

    case 3:
        printf("Final");
        break;

    }

Question Number 192

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 193

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 194

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

Question Number 195

Which of the following are constituents of a C program :

Question Number 196

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

}
void main()
{
    fun();
}

Question Number 197

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

Question Number 198

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 199

Name the looping statements available in C :

Question Number 200

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

Question Number 201

Which of the following functions are equivalent to the printf() function?

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;
    return 30;
}
int main()
{
    int z=func(100,200);
    printf("%d",z);
}

Question Number 203

Give the output of the following code snippet :

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

}

Question Number 204

Give the output of the following code snippet :
void main()
{
    static int x = 3;
    x++;
    if (x < = 5)
    {
        printf("Hello ");
        main();
    }
}

Question Number 205

Default storage class, if not any is specified for a local variable, is auto

Question Number 206

Visual Studio is NOT

Question Number 207

A stream is connected to a file or device by :

Question Number 208

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

Question Number 209

Give the output of the following code snippet :

void main()

{
    printf("Before continue ");
    continue;
    printf("After continue\n");
}

Question Number 210

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

Question Number 211

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

Question Number 212

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 213

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 214

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

Question Number 215

Name the looping statements available in C :

Question Number 216

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

Question Number 217

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

Question Number 218

Which of the following are keywords in C:

Question Number 219

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 220

Give the output of the following code snippet :

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

Question Number 221

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

Question Number 222

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

Question Number 223

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 224

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

Question Number 225

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

Question Number 226

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

Question Number 227

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

Question Number 228

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

Question Number 229

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 230

Give the output of the following code snippet :

void main()
{
    char new1 ='c';
    if( new1 =='C')

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

}

Question Number 231

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 232

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

Question Number 233

What is the unsigned integral produced by the sizeof operator?

Question Number 234

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 235

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 236

Which of the following statements is true about the break statement in C:

Question Number 237

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

Question Number 238

Which of the following are constituents of a C program :

Question Number 239

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

Question Number 240

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 241

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

Question Number 242

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 243

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

Question Number 244

Which of the following are constituents of a C program :

Question Number 245

Automatic variables are variables that are

Question Number 246

Consider the given code snippet in C. What is the output of the program :
void main()
{

    char a=2345;
    printf("%c",a);

}

Question Number 247

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

{
    int i=5;
    while(i)

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

Question Number 248

Give the output of the following code snippet :

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

Question Number 249

Platforms and software supported by Visual Studio are,

Question Number 250

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 251

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

Question Number 252

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

Question Number 253

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

Question Number 254

Give the output of the following code :
int main()
{
    char str1[] = "Hello";
    char str2[] = "Hello";
    if(str1 == str2)
        printf("Equal\n");
    else
        printf("Unequal\n");
    return 0;
}

Question Number 255

In which header file is the integer expression errno declared?