Professional Documents
Culture Documents
{
void f1 (int a);
int I;
for (i=0 ; i<=5 ; i++)
f1(i);
}
void f1 (int a)
{
Static int k;
int prod=;
while (k<4 )
{
prod *=a;k++;}
printf (“%d”,prod);
}
#include<stdio.h>
int x[]={0,1,2,4};
void s1 (int *p1,int *p2)
{
int temp;
temp=*p1;
*p1=*p2;
*p2=temp;
}
The output of the following program will be Accepts age and sex
#include<stdio.h> from standard input
main ()
main ()
{
{
int i=1;
int age;char sex;
x[i]=2;
puts(“What is your age?”};
s1(&I,&x[i]);
scanf(“%d”,&age);
printf(“%d” %d \n”,I,x[i]);
puts(“What is your sex?”);
}
sex=getchar();
PASS
}
The Value of k on execution of the above program will be
Produces syntax error
Which of the following statement is correct regarding
following C program?
main()
{
int I,j,*p,*s;
j=j=30;
*(p=&i)*3;
p=(s=p,s=&j,s=&i);
*s+=*p+5;
Which of the following constants does not produce over (i) And (ii) above
flow when assigned to an unsigned long integer veriable?
i. OXFFFFFFFF
ii. 42949672961
iii. 07777777777
-3 and 3
Assume that i,j and k are integer veriable and their
value are 8,5 and 0 respectively.What will be the values of
veriable I and k after executing the following expressions?
K=(j>=5)?(i<5)?i-j-k:k-j:I;
i+=(k)?(i)?(j):(i):(k);
The library function exit() causes an exit from the loop in which it occurs
accepts age but it does produces syntax error none of the above. b)
not wait to input sex
the block in which it occurs the function in which it none of the above. d)
occurs
a character when enter is and displays a none of the above. b)
pressed character on the
screen when any key is
pressed
b)related data items and c) integers with user d) none of the above a)
variables defined names