Knowledge check.

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

Question Number 1

Which of the following is not a debugger :

Question Number 2

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

Question Number 3

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 4

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

Question Number 5

Which of the following statements are true about recursion?

Question Number 6

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

Question Number 7

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 8

Identify the type of error in the given code :

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

        printf("%d",a);
    }

Question Number 9

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

Question Number 10

Which of the following is a debugger :

Question Number 11

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

Question Number 12

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 13

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

Question Number 14

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 15

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 16

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

Question Number 17

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 18

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

Question Number 19

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

Question Number 20

Name the looping statements available in C :

Question Number 21

Visual Studio is NOT

Question Number 22

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

Question Number 23

Which is a Visual Studio edition.

Question Number 24

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 25

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 26

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

Question Number 27

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

Question Number 28

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 29

Which of the following are constituents of a C program :

Question Number 30

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

Question Number 31

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

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

Question Number 32

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

Question Number 33

Breakpoints allow you to :

Question Number 34

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

Question Number 35

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 36

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 37

Which of the following is a storage specifier?

Question Number 38

Which of the following are file positioning functions in C?

Question Number 39

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(++x))));
    printf("%d",z);
}

Question Number 40

The keyword 'break' cannot be used within :

Question Number 41

Breakpoints do not allow you to :

Question Number 42

Following is a challenge with Visual studio for a beginner,

Question Number 43

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 44

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

Question Number 45

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

Question Number 46

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

Question Number 47

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

Question Number 48

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

Question Number 49

Give the output of the following code snippet :

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

Question Number 50

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

Question Number 51

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

Question Number 52

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

Question Number 53

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

Question Number 54

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

Question Number 55

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 56

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

Question Number 57

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

Question Number 58

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 59

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

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

}

Question Number 60

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

Question Number 61

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 62

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

Question Number 63

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 64

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

Question Number 65

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

Assume input as 2.45 :

Question Number 66

Platforms and software supported by Visual Studio are,

Question Number 67

Give the output of the following code snippet :

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

Question Number 68

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 69

Which of the following is true for static variable?

Question Number 70

What is integrated into Visual Studio?

Question Number 71

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

Question Number 72

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 73

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 74

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

    }
    while(x!=20);
}

Question Number 75

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

Question Number 76

Give the output of the following code snippet :
void main()
{
    int a;
    for(a=0; a< 5; a++)
    {
        if(a< 3)
            continue;
        else
            printf("Hello world");
    }
}

Question Number 77

Development tools are normally NOT used for,

Question Number 78

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 79

Which is a Visual Studio edition.

Question Number 80

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

Question Number 81

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

Question Number 82

Visual studio supports

Question Number 83

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

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

Question Number 84

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

Question Number 85

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 86

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

Question Number 87

Visual Studio is NOT

Question Number 88

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 89

Versions of Visual Studio are,

Question Number 90

Which of the following is a debugger :

Question Number 91

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


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

Question Number 92

Give the output of the following C code:
int mult(int a, int b)
{
    return a*b;

}

int sum ( int a, int b)
{
    return a+b;
}

void main()
{

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

    int t2=mult(3,30);

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


}

Question Number 93

Give the output of the following code snippet :

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

}

Question Number 94

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

Question Number 95

Visual Studio is NOT

Question Number 96

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

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

Question Number 97

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 98

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

Question Number 99

Which of the following is a valid string definition?

Question Number 100

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

Question Number 101

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 102

Give the output of the following code :
struct p
{

    char c;
    float f;
};

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

Question Number 103

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 104

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 105

Name the feature used in Visual Studio to help debugging.

Question Number 106

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 107

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

Question Number 108

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

Question Number 109

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

Question Number 110

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 111

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 112

Which of the following is a storage specifier?

Question Number 113

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 114

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

Question Number 115

Versions of Visual Studio are,

Question Number 116

The arguments to a function in C are enclosed within

Question Number 117

Which of the following is a valid string definition?

Question Number 118

Versions of Visual Studio are,

Question Number 119

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

Question Number 120

Give the output of the following code snippet :

int main()
{
    while(0)
    {
        printf("Hello world");
    }
    return 0;
}

Question Number 121

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 122

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");
    int i=0;
    while(fgets(x,5,fp)!=NULL)
    {

    }
    puts(x);
    fclose(fp);

}

Question Number 123

Which of the following are keywords in C:

Question Number 124

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

Question Number 125

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 126

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 127

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

Question Number 128

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

Question Number 129

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

Question Number 130

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

Question Number 131

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 132

Which is NOT a Visual Studio edition.

Question Number 133

Give the output of the following code snippet :
int main()
{
    do
        printf("In while loop ");
    while (0);
    printf("After loop\n");
}

Question Number 134

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

Question Number 135

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

Question Number 136

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 137

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 138

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

Question Number 139

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

Question Number 140

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

Question Number 141

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

Question Number 142

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

Question Number 143

Which of the following is not a debugger :

Question Number 144

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

Question Number 145

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

    printf("%d", x);
}

Question Number 146

What is Visual Studio?

Question Number 147

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 148

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

Question Number 149

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

Question Number 150

Platforms and software supported by Visual Studio are,

Question Number 151

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

Question Number 152

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 153

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 154

Free Edition of Visual Studio is,

Question Number 155

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

Question Number 156

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

Question Number 157

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

Question Number 158

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

Question Number 159

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

Question Number 160

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 161

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 162

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 163

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

Question Number 164

Give the output of the following code snippet :

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

Question Number 165

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

Question Number 166

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

Question Number 167

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 168

How can you deal with errors during compilation of a C program in VS?

Question Number 169

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 170

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 171

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

Question Number 172

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

Question Number 173

What is the escape sequence used to denote backslash in C?

Question Number 174

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 175

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 176

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

Question Number 177

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 178

Visual Studio is NOT

Question Number 179

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

Question Number 180

Platforms and software supported by Visual Studio are,

Question Number 181

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

Question Number 182

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

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

}

Question Number 183

Which of the following are keywords in C:

Question Number 184

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

Question Number 185

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 186

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

Question Number 187

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

Question Number 188

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

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

Question Number 189

Which of the following are constituents of a C program :

Question Number 190

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

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

Question Number 191

Platforms and software supported by Visual Studio are,

Question Number 192

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

Question Number 193

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

Question Number 194

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

Question Number 195

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

Question Number 196

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 197

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

Question Number 198

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 199

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

Question Number 200

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 201

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

Question Number 202

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

Question Number 203

Identify the type of error in the given code :

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

Question Number 204

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 205

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

Question Number 206

Versions of Visual Studio are,

Question Number 207

Visual studio supports

Question Number 208

Visual Studio has

Question Number 209

Following is a challenge with Visual studio for a beginner,

Question Number 210

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

Question Number 211

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

Question Number 212

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

Question Number 213

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 214

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

Question Number 215

Give the output of the following code snippet :

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

Question Number 216

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

Question Number 217

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 218

Which of the following functions is used to remove a named file?

Question Number 219

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

Question Number 220

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

Question Number 221

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

Question Number 222

Which integer expression contains a error number that gives further information about most recent error?

Question Number 223

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

Question Number 224

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 225

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

Question Number 226

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

    }
    while(x!=20);
}

Question Number 227

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);
    return 0;
}
int main()
{
    int x=5;
    func(x);
}

Question Number 228

Consider the given C code:
main()
{
    int val;
    char val1;
    printf("Welcome to the test");
    printf("Have a good day");
}

Identify the identifiers in the program

Question Number 229

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

Question Number 230

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 231

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

Question Number 232

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

Question Number 233

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

Question Number 234

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

Question Number 235

How can an array of strings be represented as?

Question Number 236

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

Question Number 237

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("%f\n", var.f);
}

Question Number 238

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 239

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 240

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

Question Number 241

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

Question Number 242

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 243

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

Question Number 244

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 245

Which is the function key in VS is associated with passing the control to the function definition to debug it using breakpoint:

Question Number 246

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

Question Number 247

Which of the following are keywords in C:

Question Number 248

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 249

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

Question Number 250

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

}

Question Number 251

Which of the following are keywords in C:

Question Number 252

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

Question Number 253

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 254

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

Question Number 255

What is the unsigned integral produced by the sizeof operator?