Sunday, September 28, 2008

Which one of the following statements will properly initialize the variable t with the current time from the above statement?

18. time_t t;

Choice a: t = clock();
Choice b: time( &t );
Choice c: t = ctime();
Choice d: t = localtime();
Choice e: None of the above

Friday, September 19, 2008

A compound statement is a group of statements included between a pair of

a. Double quote
b. Curly braces
c. Parenthesis
d. A pair of /’s

Thursday, September 18, 2008

What is the output of following programme ?

main( )
{
int a=30, b=40, x;
x=(a!=10) && (b=50);
printf(“x= %d”,x);
}

a. 10
b. 50
c. 1
d. 0

Sunday, September 14, 2008

"My salary was increased by 15%!"

Select the statement which will EXACTLY reproduce the line of text above.

Choice a: printf("\"My salary was increased by 15/%\!\"\n");
Choice b: printf("My salary was increased by 15%!\n");
Choice c: printf("My salary was increased by 15'%'!\n");
Choice d: printf("\"My salary was increased by 15%%!\"\n");
Choice e: printf("\"My salary was increased by 15'%'!\"\n");

Thursday, September 11, 2008

Which one of the following functions is the correct choice for moving blocks of binary data that are of arbitrary size and position in memory?

Choice a: memcpy()
Choice b: memset()
Choice c: strncpy()
Choice d : strcpy()
Choice e :memmove()

Monday, September 8, 2008

What is the output of following programme ?

int main()
{
int x = -10;
printf("%d\n", ~x+1);
return EXIT_SUCCESS:
}
a) -11
b) -9
c) 10
d) Size of the integer is required to find out the answer.

Wednesday, September 3, 2008

Whatz wrong with this !!! How can I rectify it.

int a = 20;
void main ()
{
Fun1();
}
Fun1()
{
Static int b = a;
}

Choice
a) declare ‘int a’ inside the Fun1()
b) Make the ‘int a’ as ‘const int a = 20;’
c) Its illegal initialization of static variable. Initialize with constatnts
d) Its illegal initialization of static variable. Initialize with address of a