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 :
void main()
{
    static double x;
    int x;
    printf("x is %d", x);
}

Question Number 2

Which of the following are constituents of a C program :

Question Number 3

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 4

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

Question Number 5

Give the output of the following code snippet :

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

Question Number 6

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

Question Number 7

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

Question Number 8

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

Question Number 9

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

Question Number 10

Which of the following functions is used to create a temporary name?

Question Number 11

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

Question Number 12

Platforms and software supported by Visual Studio are,

Question Number 13

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

Question Number 14

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

Question Number 15

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 16

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 17

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 18

Which of the following are keywords in C:

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

Name some of the problems associated with goto statement :

Question Number 21

How can an array of strings be represented as?

Question Number 22

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

Question Number 23

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

Question Number 24

Visual Studio has

Question Number 25

In C, the keyword used to transfer control from a function back to the calling function is

Question Number 26

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 27

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

Question Number 28

Which of the following are constituents of a C program :

Question Number 29

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

Question Number 30

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

Question Number 31

Give the output of the following code :
int main()
{
    char str1[20] = "Hello", str2[20] = " World";
    printf("%s\n", strcpy(str2, strcat(str1, str2)));
    return 0;
}

Question Number 32

Name the function key associated with debugging an application in Visual Studio :

Question Number 33

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

Question Number 34

Wizard in Visual studio is normally a set of,

Question Number 35

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

Question Number 36

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

Question Number 37

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 38

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 39

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 40

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

Question Number 41

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

Question Number 42

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


void main()
{
    int a=5;

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

Question Number 43

Identify the type of error in the given code :

void main()
{
    int a = 10;
    printf("Hello world");
    printf("%d",A)
}

Question Number 44

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

Question Number 45

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 46

Identify the keyword(s) in the program

Question Number 47

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 48

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

Question Number 49

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 50

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

Question Number 51

Consider the given code snippet :

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

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

Question Number 52

Which of the following are keywords in C:

Question Number 53

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

Question Number 54

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 55

Following is a challenge with Visual studio for a beginner,

Question Number 56

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 57

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 58

Which of the following statements in C completely stops the execution of the loop and returns from the function?

Question Number 59

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

}

Question Number 60

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

Question Number 61

Visual Studio has

Question Number 62

Give the output of the following code :
void main()
{
    char str1[]= {0};
    printf(str1);
}

Question Number 63

Which of the following statements are true regarding a function in C?

Question Number 64

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

Question Number 65

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

Question Number 66

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 67

Which of the following functions is used to create a temporary file?

Question Number 68

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 69

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 70

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

Question Number 71

Following is a challenge with Visual studio for a beginner,

Question Number 72

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 73

Give the syntax for the for loop in C :

Question Number 74

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

Question Number 75

Free Edition of Visual Studio is,

Question Number 76

How many arguments does the putchar() function take?

Question Number 77

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 78

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

Question Number 79

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 80

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 81

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

Question Number 82

Which is NOT a Visual Studio edition.

Question Number 83

Platforms and software supported by Visual Studio are,

Question Number 84

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

Question Number 85

Which function returns a non-zero value if the EOF indicator is set for file stream?

Question Number 86

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

Question Number 87

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 88

The breakpoint pauses the execution

Question Number 89

Which of the following is a debugger :

Question Number 90

Give the output of the following code snippet :

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

}

Question Number 91

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

Question Number 92

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

Question Number 93

Which is a Visual Studio edition.

Question Number 94

Give the syntax for the do-while loop in C :

Question Number 95

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

Question Number 96

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 97

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 98

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 99

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

Question Number 100

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 101

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

Question Number 102

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

    }
    while(x!=20);
}

Question Number 103

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 104

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 105

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 106

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

Question Number 107

Give the output of the following code snippet :

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

}

Question Number 108

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

Question Number 109

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 110

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 111

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 112

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

Question Number 113

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

Question Number 114

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 115

Which of the following statements are true about recursion?

Question Number 116

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

Question Number 117

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

Question Number 118

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 119

Which of the following are keywords in C:

Question Number 120

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 121

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

Question Number 122

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 123

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 124

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

Question Number 125

How many arguments does the getchar() function take?

Question Number 126

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

Question Number 127

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 128

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

Question Number 129

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 130

Give the output of the following code snippet :
int main()
{
    while(1)
    {
        printf("Hello world");
    }
    return 0;
}

Question Number 131

What is a binary stream in C?

Question Number 132

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 133

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

Question Number 134

Which of the following is a valid structure initialization?

Question Number 135

Which of the following statement is true about arrays in C :

Question Number 136

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

Question Number 137

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

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

}

Question Number 138

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

Question Number 139

Where should a function be defined in a C program to be called from the main function in a single file program?

Question Number 140

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

Question Number 141

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

Question Number 142

Give the output of the following code snippet :
int sum(int,int);
int main()
{
    int c= sum(10,20);
    printf("Sum = %d", c);
}
int sum(int a,int b)
{
    return a+b;
    return a-b;
}

Question Number 143

Give the output of the following code snippet :
struct student
{
    int mark1;
    int mark2;
} p[] = {0};
void main()
{
    printf("%d", sizeof(p));
}

Question Number 144

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 145

Identify the conditional operator in C :

Question Number 146

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 147

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

}

Question Number 148

Versions of Visual Studio are,

Question Number 149

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

Question Number 150

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 151

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

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

}

Question Number 152

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

Question Number 153

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 154

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 155

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 156

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

Question Number 157

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

Question Number 158

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

}

Question Number 159

Give the output of the following code snippet :

int main()
{
    int a = 0, i = 0, b;
    for (i = 0; i <  5; i++)
    {
        a++;
        if (i == 3)
            break;
    }
    printf("%d %d",a,b);
}

Question Number 160

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

Question Number 161

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

Question Number 162

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

Question Number 163

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 164

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

Question Number 165

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

Question Number 166

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

Question Number 167

Platforms and software supported by Visual Studio are,

Question Number 168

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

Question Number 169

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

Question Number 170

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 171

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

Question Number 172

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 173

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 174

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

Question Number 175

Platforms and software supported by Visual Studio are,

Question Number 176

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

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

Question Number 177

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

Question Number 178

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 179

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

Question Number 180

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

Question Number 181

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 182

Give the output of the following code snippet :
void main()
{
    char new1[6]="Welcome";
    printf (new1);
}

Question Number 183

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 184

Give the output of the following code snippet :
int main()
{
    int k, num = 30;
    k = (num <  10) ? 100 : 200;
    printf("%d\n", num);
    return 0;
}

Question Number 185

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

Question Number 186

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

}

Question Number 187

Which of the following is a debugger :

Question Number 188

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

Question Number 189

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

Question Number 190

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 191

Give the output of the following C code:


void main()
{

    int a=10,b=2;
    int t1=mult(a,b);

    int t2=mult(3,30);

    printf("Sum = %d", t1+t2);


}

int mult(int a, int b)
{
    return a*b;

}

Question Number 192

Versions of Visual Studio are,

Question Number 193

When it comes to programming, the debugger is as helpful as the :

Question Number 194

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 195

What is the return value of a strcmp() function?

Question Number 196

How many elements does the array arr[25] contain?

Question Number 197

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

Question Number 198

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

Question Number 199

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

Question Number 200

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

    int a1=20;
    printf("%d",a1);

}

Question Number 201

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

Question Number 202

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

Question Number 203

Give the output of the following code snippet :

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

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

}

Question Number 204

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

    return 0;
}

Question Number 205

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

Question Number 206

Identify the general syntax of the conditional operator in C :

Question Number 207

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

Question Number 208

Give the output of the following code snippet :

int main()
{
    int i=0;
    for(i=0; i< 5; i++)
    {
        if((i==2)||(i==4))
            continue;
        printf("Ho");
    }
    printf("Hello World");

}

Question Number 209

Which of the following statements are true about keywords in C?

Question Number 210

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

Question Number 211

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

Question Number 212

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 213

What is the unsigned integral produced by the sizeof operator?

Question Number 214

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

Question Number 215

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

Question Number 216

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 217

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

Question Number 218

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

Question Number 219

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

Question Number 220

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 221

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

Question Number 222

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

Question Number 223

Platforms and software supported by Visual Studio are,

Question Number 224

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 225

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 226

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

Question Number 227

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 228

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

Question Number 229

Which of the following is not a debugger :

Question Number 230

What is the general syntax to call a function in C?

Question Number 231

Debugging helps in the following :

Question Number 232

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 233

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

Question Number 234

Which of the following modes denote opening a binary file for reading?

Question Number 235

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 236

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

Question Number 237

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

Question Number 238

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 239

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

Question Number 240

Give the output of the following code snippet :
int main()
{
    struct value
    {
        int mark1;
        int mark2;
    } val= {10,20};

    printf("%d %d\n", val.mark1,val.mark2);
}

Question Number 241

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

Question Number 242

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

Question Number 243

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 244

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

Question Number 245

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

Question Number 246

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

Question Number 247

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

Question Number 248

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 249

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 250

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

Question Number 251

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 252

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 253

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


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

Question Number 254

Give the output of the following code :
struct p
{

    char c;
    float f;
};

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

Question Number 255

Breakpoints allow you to :