71. Comment on the following C statement.
n = 1;
printf("%d, %dn", 3*n, n++);
n = 1;
printf("%d, %dn", 3*n, n++);
72. What will be the output of the following C code?
#include<stdio.h>
main()
{
signed char a[]= “BAT”;
printf(“%c”, a[1]);
return 0;
}
#include<stdio.h>
main()
{
signed char a[]= “BAT”;
printf(“%c”, a[1]);
return 0;
}
73. What will be the output of the following C code?
#include <stdio.h>
void inline func1(int a, int b)
{
printf ("a=%d and b=%d\n", a, b);
}
int inline func2(int x)
{
return x*x;
}
int main()
{
int tmp;
func1(1,4);
tmp = func2(6);
printf("square val=%d\n", tmp);
return 0;
}
#include <stdio.h>
void inline func1(int a, int b)
{
printf ("a=%d and b=%d\n", a, b);
}
int inline func2(int x)
{
return x*x;
}
int main()
{
int tmp;
func1(1,4);
tmp = func2(6);
printf("square val=%d\n", tmp);
return 0;
}
74. The principle of stack is . . . . . . . .
75. Which of the following header files must necessarily be included in your code, if you want to find the minimum value of unsigned short integer?
76. How many times is 'a' printed when the following C code is executed?
#include<stdio.h>
main()
{
int a;
a=f1(10);
printf("%d",a);
}
f1(int b)
{
if(b==0)
return 0;
else
{
printf("a");
f1(b--);
}
}
#include<stdio.h>
main()
{
int a;
a=f1(10);
printf("%d",a);
}
f1(int b)
{
if(b==0)
return 0;
else
{
printf("a");
f1(b--);
}
}
77. In a signed integer, the sign is represented by . . . . . . . .
78. What is the default state of an integer in c language?
79. Comment on the output of following C code.
#include <stdio.h>
main()
{
char *p = 0;
*p = 'a';
printf("value in pointer p is %c\n", *p);
}
#include <stdio.h>
main()
{
char *p = 0;
*p = 'a';
printf("value in pointer p is %c\n", *p);
}
80. What will be the output of the following C code?
#include <stdio.h>
void inline f1(char b)
{
printf ("%d\n",b);
}
int main()
{
f1('a');
return 0;
}
#include <stdio.h>
void inline f1(char b)
{
printf ("%d\n",b);
}
int main()
{
f1('a');
return 0;
}