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.
Which of the following is not a debugger :
Which of the following statements is true about a minimal function in C?
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);
}
Give the output of the following code snippet :
void main()
{
int i=0;
do
{
i=i+3;
printf("%d",i);
}
while(1);
}
Which of the following statements are true about recursion?
Which of the keywords denote the size and type of a variable in C :
Give the output of the following code snippet :
void main()
{
int a=12,i=0;
--a;
i++;
do
{
printf("%d",a);
++i;
}
while(--i);
}
Identify the type of error in the given code :
void main()
{
int a = 10;
{
printf("Hello world");
printf("%d",a);
}
How many elements does the array arr[25] contain?
Which of the following is a debugger :
Which of the following is an example of looping in C?
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);
}
Which of the following are the user interfaces that help to debug a program with Visual Studio:
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);
}
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);
}
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);
}
}
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);
}
Which of the following statements is true about the setvbuf() function?
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);
}
Name the looping statements available in C :
Visual Studio is NOT
In the while loop, how many times is the loop executed if the condition is false?
Which is a Visual Studio edition.
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);
}
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;
}
Which of the following methodologies are used to control the flow of the program in C?
When it comes to programming, the debugger is as helpful as the :
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);
}
Which of the following are constituents of a C program :
Name the type of errors that occur due to a missing semi-colon(;) in a C program:
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");
}
What is the use of the compiler error code when an error occurs in a C program in VS?
Breakpoints allow you to :
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);
}
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);
}
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;
Which of the following is a storage specifier?
Which of the following are file positioning functions in C?
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);
}
The keyword 'break' cannot be used within :
Breakpoints do not allow you to :
Following is a challenge with Visual studio for a beginner,
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);
}
}
If two strings are identical, then what does the strcmp() function return?
Which of the keywords denote the size and type of a variable in C :
Which of the following modes denote opening a binary file for reading?
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);
}
Give the output of the following code snippet :
struct student
{
char c[10];
};
void main()
{
struct student s;
printf("%d", sizeof(s));
}
Give the output of the following code snippet :
void main()
{
int i = 2;
do
{
printf("Hi ");
}
while (i < 2)
}
Which of the keywords denote the size and type of a variable in C :
Which of the keywords denote the size and type of a variable in C :
Which of the following are not features of Debugging with Visual Studio :
Give the output of the following code snippet :
int main()
{
printf("%d", d++);
}
int d = 10;
Which of the following is NOT related to a Microsoft Development tool package?
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?
Which of the following modes is used to indicate line buffering of text files in the setvbuf() function?
Give the output of the following code snippet :
int main()
{
int i=0;
while(!i++)
{
printf("%d",i--+ ++i);
main();
return 0;
}
}
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;
}
Consider the given code snippet in C. What is the output of the program :
void main()
{
char a=2345;
printf("%c",a);
}
Which of the keywords denote the size and type of a variable in C :
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);
}
Consider the given example of a function declaration in C. State which of the following is correct.
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);
}
Give the output of the following code snippet :
void main()
{
static int x;
if (x++ < 2)
{
printf("Ho " );
main();
}
}
Give the output of the following code snippet :
void main( )
{
float c;
c = getchar( );
printf( "\nYou entered: ");
putchar( c );
}
Assume input as 2.45 :
Platforms and software supported by Visual Studio are,
Give the output of the following code snippet :
int main()
{
for (int i = 0; i < 1; i++)
printf("In the loop");
}
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;
}
Which of the following is true for static variable?
What is integrated into Visual Studio?
Which of the following are the user interfaces that help to debug a program with Visual Studio:
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);
}
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);
}
}
Give the output of the following code snippet :
void main()
{
char x=10;
do
{
x=10;
printf("%d ",x);
}
while(x!=20);
}
Which of the keywords denote the scope of a variable in C :
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");
}
}
Development tools are normally NOT used for,
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]);
}
Which is a Visual Studio edition.
Which mode is used to denote opening the binary file for update?
Which of the following functions are available in the header file string.h in C?
Visual studio supports
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);
}
Give the output of the following code snippet :
struct student
{
int mark1;
int mark2;
} p[] = {0};
void main()
{
printf("%d", sizeof(p));
}
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 ");
}
}
Which of the following statements is true about Strings in C :
Visual Studio is NOT
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);
}
Versions of Visual Studio are,
Which of the following is a debugger :
Give the output of the following C code:
void hello()
{
printf("Welcome");
}
void main()
{
hello();
printf("I repeat");
hello();
}
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));
}
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");
}
What is the escape sequence used to denote a tab space in C?
Visual Studio is NOT
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);
}
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);
}
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);
}
Which of the following is a valid string definition?
What are the functions that are available to manipulate strings in C?
Give the output of the following code snippet :
void main()
{
char new1[]="Hi";
for(int i=0; i< 3; i++)
{
printf("%d ",new1[i]);
}
}
Give the output of the following code :
struct p
{
char c;
float f;
};
int main()
{
printf("%c %f \n", c, f);
}
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);
}
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);
}
Name the feature used in Visual Studio to help debugging.
Give the output of the following code :
struct student
{
int no;
char name[20];
};
void main()
{
struct student s;
no = 8;
printf("%d", no);
}
Which of the following functions are required to access and create a file in C?
Which is the function used to length of a string in C?
A function in C must always return a value. State true or false :
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);
}
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);
}
Which of the following is a storage specifier?
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 ");
}
Which keyword in C does not change the number of iterations which could have been executed by the condition?
Versions of Visual Studio are,
The arguments to a function in C are enclosed within
Which of the following is a valid string definition?
Versions of Visual Studio are,
Which is the header file used to help manipulate strings in C?
Give the output of the following code snippet :
int main()
{
while(0)
{
printf("Hello world");
}
return 0;
}
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);
}
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);
}
Which of the following are keywords in C:
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);
}
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;
}
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);
}
Where should a function be defined in a C program to be called from the main function in a single file program?
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);
}
Which of the following functions control the buffering of the stream?
Which of the following operators performs the same function of the logical AND operator?
Give the output of the following code snippet :
int main()
{
int i;
for (i = 1; i !=6; i += 2)
printf("Ho ");
return 0;
}
Which is NOT a Visual Studio edition.
Give the output of the following code snippet :
int main()
{
do
printf("In while loop ");
while (0);
printf("After loop\n");
}
Which of the following statements is true about structures in C?
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);
}
Give the output of the following code snippet :
struct student
{
int no;
};
void main()
{
struct student s;
s.no=1001;
printf("%d",s.no);
}
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);
}
Which mode is used to denote opening the text file for writing but discards any previous contents if any?
Which of the following statements is not true about the fclose() function?
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);
}
Which of the following functions is used to set the file position for the stream?
Which mode is used to denote opening the text file for writing, where the writing is done at the end?
Which of the following is not a debugger :
How many elements can the array arr[10][5] hold?
Give the output of the following code snippet :
register int x;
void main()
{
printf("%d", x);
}
What is Visual Studio?
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;
}
In C, which of the following are the possible scope of a variable?
In C, if you pass an array as an argument to a function, what actually gets passed?
Platforms and software supported by Visual Studio are,
For a 32 bit float number with 6 significant bits, the magnitude lies between :
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());
}
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);
}
Free Edition of Visual Studio is,
Which mode is used to denote opening the binary file for update but discards any previous contents if any?
Which of the keywords denote the size and type of a variable in C :
Which of the following statements is true about a text stream in C?
A function can be used as a parameter for another function. State true or false :
The steps to start a New Wizard in Visual Studio 2010 is,
Give the output of the following code snippet :
void main()
{
char new1 ='c';
if(( new1 =='C') || (new1 =='c'))
printf("Same");
else
printf("Not Same");
}
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);
}
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);
}
}
Give the output of the following code :
void main()
{
char new1[]= { 0 };
strcpy(new1,"Jello");
int n=strlen(Jello);
printf("%d ",n);
}
Give the output of the following code snippet :
void main()
{
static int x;
printf("x is %d", x);
}
Give the output of the following code snippet :
int main()
{
int i=0;
while(!i++)
{
printf("%d",i--+ ++i);
main();
}
}
Which of the following statements is true about the fclose() function?
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);
}
}
How can you deal with errors during compilation of a C program in VS?
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);
}
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);
}
Which of the following functions are available in the header file string.h in C?
Which of the following is a valid initialization of a multidimensional array?
What is the escape sequence used to denote backslash in C?
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);
}
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);
}
What are the two ways in which the arguments can be passed to a function?
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;
}
Visual Studio is NOT
Give the output of the following code snippet :
int main()
{
while()
{
printf("Hello world");
}
return 0;
}
Platforms and software supported by Visual Studio are,
Consider the given example of a function declaration in C. State which of the following is valid.
Give the output of the following code snippet :
void demo();
int main()
{
demo();
return 0;
}
void demo()
{
printf("Hello ");
}
Which of the following are keywords in C:
Which of the keywords denote the size and type of a variable in C :
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 );
}
What is the return type of the getchar() function?
External static declaration can be applied to functions as well. State true or false :
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();
}
Which of the following are constituents of a C program :
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);
}
Platforms and software supported by Visual Studio are,
Which of the keywords denote the size and type of a variable in C :
Show the correct order of execution for creating and executing a program in Visual Studio:
Give the output of the following code snippet :
struct student
{
int no;
};
void main()
{
struct student s;
no=10;
printf("%d",no);
}
Which of the following statements are true regarding a function in C?
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();
}
The rewind(fp) function is equivalent to which of the following functions?
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);
}
Which of the keywords denote the scope of a variable in C :
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);
}
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);
}
Which of the following steps are required to execute a C program in Visual Studio?
Identify the type of error in the given code :
void main()
{
int a = 10;
printf("Hello world");
printf("%d",A)
}
Give the output of the following code :
void main()
{
char new1[]= { 0 };
strcpy(new1,"Jello");
int n=strlen(new1);
printf("Length : %d ",n);
}
According to the presenter, to overcome the learning curve with Visual Studio, with ease, it’s better to
Versions of Visual Studio are,
Visual studio supports
Visual Studio has
Following is a challenge with Visual studio for a beginner,
Which of the keywords denote the size and type of a variable in C :
Give the output of the following code snippet :
void main()
{
int i=0;
do
{
printf("%d",i);
i++;
}
while(i);
}
How many arguments are passed to the strlen function for string manipulation in C?
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);
}
Which of the following is an example of loop in C?
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;
}
Name some of the basic errors that may occur during compilation of a C program :
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);
}
Which of the following functions is used to remove a named file?
Which is the keyword used to create a structure in C?
Give the syntax for the do-while loop in C :
Which of the following statements is an example of an array initialization in C?
Which integer expression contains a error number that gives further information about most recent error?
Give the output of the following code snippet :
void main()
{
int i=0;
do
{
i=i+3;
i++;
printf("%d",i);
}
while();
}
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);
}
Which of the following functions are available in the header file string.h in C?
Give the output of the following code snippet :
void main()
{
char x=10;
do
{
x+=10;
printf("%d ",x);
}
while(x!=20);
}
Give the output of the following code snippet :
int func(int a)
{
int b=10,i=0;
while(a!=0)
{
int c=a+b;
a--;
b--;
}
printf("%d ",c);
return 0;
}
int main()
{
int x=5;
func(x);
}
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
Which of the following statements is true about Strings in C :
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);
}
Which mode is used to denote opening the binary file for writing, where the writing is done at the end?
Which of the following statements is true about the setvbuf() function?
Which of the keywords denote the size and type of a variable in C :
Which of the following is NOT related to a Microsoft Development tool package?
How can an array of strings be represented as?
Give the output of the following code snippet :
void main()
{
Test();
void Test()
{
printf("Hello");
}
}
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);
}
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--);
}
Give the output of the following code snippet :
int main()
{
int i=0;
if(i--)
{
printf("%d",i++);
main();
}
else
printf("%d",--i);
}
Which of the keywords denote the size and type of a variable in C :
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);
}
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);
}
Which of the following statements is true by the Call by value method?
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--;
}
Which is the function key in VS is associated with passing the control to the function definition to debug it using breakpoint:
When a program begins execution, which of the following streams are open?
Which of the following are keywords in C:
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);
}
What is the value of the argument given to the character testing functions defined in ctype.h?
Give the output of the following code snippet :
void main()
{
int a=12,i=1;
--a;
while(!i)
{
printf("%d",a);
}
}
Which of the following are keywords in C:
Which is the function used to copy a particular string into an array in C?
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);
}
How many arguments are passed to the strcmp function for string manipulation in C?
What is the unsigned integral produced by the sizeof operator?