int (*fun())[]
![]()
Practice Complicated Declarations – int (*fun())[]
![]()
Practice Complicated Declarations – int (*fun())[]
![]()
Practice Input / Output – If the content of a file (input) is abc def. What will be the value of input and ch?.
#include
char input[100],ch;
void main(void)
{
FILE *fp;
fp = fopen("input","rb");
fscanf(fp, "%s" ,&input);
fscanf(fp, "%c" ,&ch);
printf("%s %c", input, ch);
} ![]()
Practice Expressions – What will be the final value of num1 and num2?
#include
int main()
{
long num1 = 0;
long num2 = 0;
long *pnum = NULL;
pnum = &num1;
*pnum = 2;
++num2;
num2 += *pnum;
pnum = &num2;
++*pnum;
return 0;
} ![]()
Practice Basic Concept – What will be output of the following “C” code?
#include
void main()
{
printf("%d ",printf("FACE"));
} ![]()
Practice Declarations and Initializations – What will be output of the following “C” code?
#include
main()
{
100;
printf("%d",100);
} ![]()
Practice Basic Concept – What will be output of the following “C” code?
#include
void main()
{
printf("
ks");
printf("mi a");
printf("
ha n");
} ![]()
Practice Functions – If a function is defined as static, it means
![]()
Practice Bitwise Operators – Which among the following operator has the right to left associativity?
![]()
Practice Control Instructions – Predict the output of following “C” code:
void main()
{
if(5,4,3,2,1,0,8,9)
printf("True");
else
printf("False");
} ![]()
Practice Expressions – Predict the output of following “C” code:
void main()
{
int i=10,j=2,k=0,m;
m=++i&&++j&&++k;
printf("%d,%d,%d,%d",i,j,k,m);
} ![]()
Practice Variable Number of Arguments – What will be output of the following “c” code?
#include
void main(){
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
} ![]()
Practice Expressions – What will be output of the following “C” code?
#include
void main()
{
int i=10;
printf("%d,%d",++i,++i);
} ![]()
Practice Structures, Unions, Enums – What will be the size of these structures?
#include
struct S1 {
char c;
int i[2];
double v;
} SA1;
struct S2 {
double x;
int i[2];
char c;
} SA2;
int main()
{
printf("
sizeof S1 %d : Sizeof S2 %d ",sizeof(SA1),sizeof(SA2));
return 0;
}Note:char takes 1 byte, int takes 4 bytes, double takes 8 bytes
![]()
Practice Arrays – What will be the output of the program ?
int main()
{
int a[5] = {5, 1, 15, 20, 25};
int i, j, m;
i = ++a[1];
j = a[1]++;m = a[i++];
printf("%d, %d, %d", i, j, m);
return 0;
} ![]()
Practice Functions – Is there any difference between following declarations?
A : extern int fun();
B : int fun();