Q. What is the output of this program?
Code:main()
{
struct
{
int i;
}xyz;
(*xyz)->i=10;
printf(“%d”,xyz.i);
}
Dear candidates you will find MCQ questions of C Programming here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
main()
{
struct
{
int i;
}xyz;
(*xyz)->i=10;
printf(“%d”,xyz.i);
}
#include
main()
{
char str[]=”S\065AB”;
printf(“n%d”, sizeof(str));
}
define square(x) x*x a = square(2+3)
long factorial (long x)
{
????
return x * factorial(x – 1);
}
int y[4] = {6, 7, 8, 9};
int *ptr = y + 2; printf(“%dn”, ptr[ 1 ] );
int i = 4;
switch (i)
{
default: ;
case 3:
i += 5;
if ( i == 8)
{
i++;
if (i == 9) break;
i *= 2;
}
i -= 4;
break;
case 8:
i += 5;
break;
}
printf(“i = %dn”, i);
void main()
{
if(printf(“cquestionbank”))
printf(“I know c”);
else
printf(“I know c++”);
}
#define call(x) #x
void main(){
printf(“%s”,call(c/c++));
}
void main(){
int a=25;
clrscr();
printf(“%o %x”,a,A.;
getch();
}