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.
Give the output of the following code snippet :
void main()
{
static double x;
int x;
printf("x is %d", x);
}
Which of the following are constituents of a C program :
Give the output of the following code snippet :
void main()
{
printf("Welcome");
goto L2 ;
L1:
printf("Loop 1");
L2:
printf("Loop2");
goto L1;
}
Which of the following statements indicate the general nature of computer programs?
Give the output of the following code snippet :
int main()
{
register static int i = 10;
i = 11;
printf("%d\n", i);
}
Which of the following parts of a function are required when calling a function:
A new C program can be executed without being compiled . True or False?
Which of the following is a ways can be used to represent an array of Strings in C?
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 functions is used to create a temporary name?
What are the types of functions that can be used in C?
Platforms and software supported by Visual Studio are,
Which of the following statements is true about the fclose() function?
Give the output of the following code snippet :
void main()
{
int x = 3;
{
x = 4;
printf("%d ", x);
}
printf("%d", x);
}
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;
}
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 ");
}
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);
}
Which of the following are keywords in C:
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);
}
}
Name some of the problems associated with goto statement :
How can an array of strings be represented as?
Which of the following are the user interfaces that help to debug a program with Visual Studio:
The rewind(fp) function is equivalent to which of the following functions?
Visual Studio has
In C, the keyword used to transfer control from a function back to the calling function is
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 statements is true about structures in C?
Which of the following are constituents of a C program :
Which of the following statements is true about the setvbuf() function?
Which of the following statements is true about an escape sequence in C?
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;
}
Name the function key associated with debugging an application in Visual Studio :
Give the output of the following code snippet :
struct
{
int no;
}
void main()
{
struct s;
s.no=10;
printf("%d",no);
}
Wizard in Visual studio is normally a set of,
Which of the following steps are required to execute a C program in Visual Studio?
The last element of the array arr[10] is accessed by :
Give the output of the following code snippet :
void main( )
{
int c;
c = getchar( );
printf( "\nYou entered: ");
putchar( c );
}
Assume input as 6 :
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()
{
struct employee
{
int id=10;
};
struct employee emp1= {20};
printf("%d\t",emp1.id);
}
Give the output of the following code :
void main()
{
int var = strcmp("Yellow","World");
printf("%d", var);
}
Give the output of the following code snippet :
void func()
{
int i=1;
while(!i)
{
func();
}
printf("%d",i++);
}
void main()
{
func();
}
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;
}
}
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 snippet :
void main()
{
int a=12;
a==12?a=0:a=1;
printf("%d",a);
}
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);
}
Identify the keyword(s) in the program
Give the output of the following code snippet :
void test();
void main()
{
test();
test();
}
void test()
{
static int x = 5;
x++;
printf("%d", x);
}
Property of external variable to be accessed by any source file is called as
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);
}
Which of the following are the user interfaces that help to debug a program with Visual Studio:
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 are keywords in C:
Name the function key associated with setting up a breakpoint in VS :
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);
}
Following is a challenge with Visual studio for a beginner,
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);
}
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);
}
Which of the following statements in C completely stops the execution of the loop and returns from the function?
Give the output of the following code snippet :
void main()
{
int a=12,i=0;
--a;
while(!i)
{
printf("%d",a);
}
}
Name the type of errors that occur due to a missing semi-colon(;) in a C program:
Visual Studio has
Give the output of the following code :
void main()
{
char str1[]= {0};
printf(str1);
}
Which of the following statements are true regarding a function in C?
If the fopen() function is not able to open a file, then what does it return?
Give the output of the following code snippet :
void main()
{
int i=0;
do
{
printf("%d",i);
i++;
}
while(i);
}
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);
}
Which of the following functions is used to create a temporary file?
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);
}
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;
}
}
What are the functions that are available to manipulate strings in C?
Following is a challenge with Visual studio for a beginner,
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 syntax for the for loop in C :
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--;
}
Free Edition of Visual Studio is,
How many arguments does the putchar() function take?
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;
}
What is the return-type of the function sqrt() in C?
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);
}
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;
}
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);
}
Which is NOT a Visual Studio edition.
Platforms and software supported by Visual Studio are,
Which of the following are parts of a function in C:
Which function returns a non-zero value if the EOF indicator is set for file stream?
What is the green play button in the Visual studio does?
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);
}
The breakpoint pauses the execution
Which of the following is a debugger :
Give the output of the following code snippet :
void main()
{
int n;
for (n = 4; n!=0; n--)
printf("%d ", n--);
}
Give the output of the following code snippet :
int main()
{
int i=0;
while(!i++)
{
printf("%d",i--+ ++i);
return 0;
main();
}
}
Which of the following is related to a Microsoft Development tool package.
Which is a Visual Studio edition.
Give the syntax for the do-while loop in C :
Some of the ways in which looping can be carried out in C is :
Give the output of the following program :
void main()
{
int a=5, b=10;
if(a==5)&&if(b==10)
printf("Values match");
}
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);
}
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;
}
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 :
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);
}
What are the functions that are available to manipulate strings 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 m();
void main()
{
int k = m();
printf("%d", k);
}
int m()
{
int a[2] = {5, 8};
return a[0];
}
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");
}
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;
}
Which is the function used to concatenate two strings in C?
Give the output of the following code snippet :
void main()
{
Test();
}
void Test()
{
printf("Hello");
}
Which of the keywords denote the size and type of a variable in C :
Give the output of the following code snippet :
void main()
{
struct employee
{
int id;
};
struct employee emp1= {20};
printf("%d\t",emp1.id);
}
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);
}
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;
}
}
Which of the following is related to a Microsoft Development tool package?
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);
}
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();
}
Which of the following statements are true about recursion?
Which of the following statements is true about a file in C?
Which of the keywords denote the size and type of a variable in C :
Give the output of the following code :
int main()
{
int i=1;
if(!i)
printf("Hello,");
else
{
i=0;
printf("Jello");
main();
}
return 0;
}
Which of the following are keywords in C:
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));
}
The nth element of an array arr[n] of n values is accessed by:
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");
}
}
Give the output of the following code snippet :
void main()
{
int a=12,i=0;
--a;
i++;
do
{
printf("%d",a);
++i;
}
while(--i);
}
Which of the following operators performs the same function of the logical NOT operator?
How many arguments does the getchar() function take?
Which of the following statements is true by the Call by reference method?
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 statements is true about the remove() function?
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);
}
Give the output of the following code snippet :
int main()
{
while(1)
{
printf("Hello world");
}
return 0;
}
What is a binary stream in C?
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);
}
Name the header file used to call the printf function in the main program.
Which of the following is a valid structure initialization?
Which of the following statement is true about arrays in C :
Which of the following statements is true about the break statement in C:
Consider the given code snippet in C. What is the output of the program :
void main()
{
char a=2345;
printf("%c",a);
}
What are the arguments passed to the fread() function?
Where should a function be defined in a C program to be called from the main function in a single file program?
Which of the following modes is used to indicate line buffering of text files in the setvbuf() function?
Which of the following steps are required to execute a C program in Visual Studio?
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;
}
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 :
int main()
{
int i;
for(i=0; i< =2; i++)
{
int i=5;
printf("%d ",i);
}
printf("%d",i);
return 0;
}
Identify the conditional operator 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 :
void main()
{
char arr[11]="The African";
printf("%s",arr);
}
Versions of Visual Studio are,
How many arguments are passed to the strcmp function for string manipulation in C?
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);
}
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");
}
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()
{
int a=13;
if(a==12)
a==12?a=0:a=1;
else
a--;
printf("%d",a);
}
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;
}
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);
}
Which of the following statements is true about the tmpnam() function?
Which mode is used to denote opening the binary file for update?
Give the output of the following code snippet :
void main()
{
int a=12,i=0;
--a;
while(++i)
{
printf("%d",a);
++i;
}
}
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);
}
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 ");
}
Which is the keyword used to create a structure in C?
Which of the following is not a logical operator in C ?
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);
}
Give the syntax for an if-else/if-else if statement :
Which of the following functions are equivalent to the printf() function?
What is the escape sequence used to denote a tab space in C?
Platforms and software supported by Visual Studio are,
Which of the following are parts of a function in C:
Which of the following correctly accesses the seventh element stored in arr, an array with 10 elements?
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();
}
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);
}
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;
for(i=0; i< =4; i++)
{
printf("%d",i);
break;
printf(" Test1");
}
printf(" Test2");
}
Which of the following statements is true about the EOF character in C?
Platforms and software supported by Visual Studio are,
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);
}
What does the fclose() function take as the argument?
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");
}
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;
}
Which of the following is used to represent comments in C:
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;
}
Give the output of the following code snippet :
void main()
{
char new1[6]="Welcome";
printf (new1);
}
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]);
}
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;
}
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++);
}
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);
}
Which of the following is a debugger :
Which of the keywords denote the size and type of a variable in C :
Which of the following is an example of looping in C?
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);
}
}
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;
}
Versions of Visual Studio are,
When it comes to programming, the debugger is as helpful as the :
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);
}
What is the return value of a strcmp() function?
How many elements does the array arr[25] contain?
Which of the following functions are available in the header file string.h in C?
Which of the keywords denote the size and type of a variable in C :
Which of the following characters are printed by the ispunct() function defined in ctype.h?
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);
}
Which mode is used to denote opening the text file for writing, where the writing is done at the end?
Give the output of the following code snippet :
void main()
{
static int x = 3;
x++;
if (x < = 5)
{
printf("Hello ");
main();
}
}
Give the output of the following code snippet :
void main()
{
char new1 ='c';
if( new1 =='C')
printf("Same");
else
printf("Not Same");
}
Give the output of the following code snippet :
int main()
{
for(int i=0; i< =4; i++)
{
printf("%d ",i);
}
return 0;
}
Which function prints an error message corresponding to integer in errno ?
Identify the general syntax of the conditional operator in C :
The steps to start a New Wizard in Visual Studio 2010 is,
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");
}
Which of the following statements are true about keywords 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 ",a,b,c);
}
Which of the following statements is true about the tmpfile() function?
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);
}
What is the unsigned integral produced by the sizeof operator?
Which of the following statements is true about Strings in C :
Give the output of the following code snippet :
void main()
{
register int x;
printf("%d", x);
}
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);
}
Which mode is used to denote opening the text file for update where the writing is done at the end?
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 :
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);
}
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);
}
}
Which of the following steps are required to execute a C program in Visual Studio?
Give the output of the following code snippet :
void main()
{
Test();
void Test()
{
printf("Hello");
}
}
Platforms and software supported by Visual Studio are,
Give the output of the following code snippet :
struct student
{
int no;
}
void main()
{
struct student s;
s.no=10;
printf("%d",no);
}
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);
}
Give the output of the following code snippet :
void main()
{
int i = 0;
while (++i)
{
printf("Ho");
}
}
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);
}
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);
}
Which of the following is not a debugger :
What is the general syntax to call a function in C?
Debugging helps in the following :
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);
}
Which of the keywords denote the scope 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;
for (i = 0; i < 3; i++)
{
if (i > 1)
break;
printf("Ho ");
}
}
Which of the following functions is used to get the current position for file stream?
In which header file is the EOF character defined in C?
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);
}
Name some of the basic errors that may occur during compilation of a C program :
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);
}
Which of the following is related to a Microsoft Development tool package.
Which of the following statements is true with regards to the break statement :
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();
}
Consider the given example of a function declaration in C. State which of the following is correct.
Name some of the basic errors that may occur during compilation of a C program :
What is the range of the values allowed for the data type int in C:
Which of the following statements is not true about the fclose() function?
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);
}
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);
}
Which of the following statements is true about Strings in C :
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();
}
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);
}
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 code :
struct p
{
char c;
float f;
};
int main()
{
printf("%c %f \n", c, f);
}
Breakpoints allow you to :