You are on page 1of 6

main() a) 0 1 2 3

{
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);
}

If a=Oxaa and b=a<<1 then a) b=a


when a new element is inserted in the middle of a linked a) only the element that
list,which of the following is true ? appear after the new
element need to be
removed.
The function sprintf() works like printf(), but operates on - a) Data in a file;
If the space occupied by two string s1 and s2 in 'C' are less than m+n
respectively m and n , the space occupied by string obtained
by concatanating s1 and s2 is always
which of the following 'C' type is not a primitive data structure? not

Suppose DATA array contains 1000000 elements.Using the 60


Binary Search algorithm, one requires only about n
computations to find the location of an item in the DATA array,
then n is
If the address of the 8th element in a linked list of integer is 1024
1022, then the address of 9th element is
What will be the value returned by the following function, when function does not return
it is called with 11? any value,because it
recur(int num) goes into an infinite loop.
{
if ((num/2)!= 0 ) retuen (recur(num/2) * 10 +num%2)
else return 1;
}

Consider the following set of statements: 70


foat x , y;
x = 7;
y = 10;
x*=y*=y+28.5;
After the execution of the above set of statements, the value of
x will be
What does the following program ststement do on executing opens file tools.dat in the
the following statement under MS-DOS Environment ? directory.
F1= fopen("c:\new\tools.dat","wb")

The output of the following program will be 21

#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

Consider the following program


#include<stdio.h>
main ()
{
int x= 105;y=0;z=30;
char k[4];
strcpy (k,”FAIL”);
if (x/20 = = 5 && (x*y>100 || y+z*2<75))
if (x<<2<=256)
strcpy(k,”PASS”);
else strcpy(k,”pass”);
else strcpy(k,”fail”);

}
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

character when any key


is pressed

The getch() library function returns


a) may be supplied by the
calling program or
A default argument has a value that function
b) 0 1 c) 0 1 2 3 4 5 d) 0 1 4 9 16 25 a)

b) b=2a c) a=2b d) b=a-1 b)


b) only the element that c) the element that d) none of the above. d)
appear before the new appears before & after
element need to be the new element need
removed. to be removed.
b) stderr c) stdin d) string d)
equal than m+n greater than m+n none of the above. a)

float chan none of the above. d)

45 20 none of the above. c)

1026 1023 none of the above. d)

11 1011 none of the above. c)

2695 2995 none of the above. d)


returns NULL,because the Gives syntax none of the above. a)
path name is improper error,because the
mode of file opening is
improper
12 22 none of the above. a)

accepts age but it does produces syntax error none of the above. b)
not wait to input sex

FAIL pass none of the above. c)


*s,*p and I are equal *s,*p and j are equal none of the above. a)

(i) and (iii) above all of above none of the above. c)

3 and 5 3 and 3 -5 and 3 d)

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

You might also like