Editing: /home/free8662/public_html/ccat-section-b-test-1.php Encoding: Re-open Use Code Editor Close Save Changes CDAC CCAT section B test 2 -freetests4u.com

freetests4u.com

Online knowledge sharing platform

CDAC-CCAT section B Mock test -2 (15 questions, time 15 minutes)

1.
What is the output of the following program segment ?

main()
{
long i = 65536;
printf("%d ", i);
}

0
-1
1
65
65536
2.
What will be output of the following program ?

#include<`stdio.h`>    (Please neglect `` this signs)
int main()
{
int x;
x=10,20,30;
printf("%d",x);
return 0;
}

10
20
30
40
None of these
3.
main()
{
printf("%p", main());
}

Prints 0.
Is an error.
Is an infinite loop.
Prints the address of main function.
None of these
4.
The << operator is used for

Right shifting
Left shifting
Bitwise shifting
Bitwise complement
None of these
5.
The C language includes the header file standard input & output in

stdlib.h library
stdio.h library
conio.h library
#include library
None of these
6.
When queues are created

Are initially empty
Are initialized to zero
Are initialized to one
Are considered full
None of the above
7.
Literal means

a string.
a string constant.
a character.
an alphabet.
None of the above.
8.
A self contained block of statements that perform a coherent task of some kind is called a

Monitor
Function
Program
Structure
None of the above
9.
Unsigned integer occupies

One byte
Two bytes
Four bytes
Eight bytes
None of the above
10.
Time taken for addition of element in queue is

(1)
(n)
(log n)
(2 Log n)
None of these
11.
When stacks are created

Are initially empty
Are initialized to zero
Are initialized to one
Are considered full
None of these
12.
The code :

int i = 7;
printf("%d ", i++ * i++);

prints 49
prints 56
is compiler dependent
expression i++ * i++ is undefined
None of the above
13.
What will be output if you will execute following C code ?

#include<`stdio.h`>    (Please neglect `` this signs)
int main()
{
char arr[20]="MysticRiver";
printf("%d",sizeof(arr));
return 0;
}

10
11
20
21
31
14.
Consider the following program :

main ( )
{ float a = 0.5, b = 0.7;
if (b < 0.8)
if (a < 0.5)
printf ("ABCD");
else printf ("PQR");
else printf ("JKLF");
}

The output is:

ABCD
PQR
JKLF
Error
None of these
15.
What will be output if you will compile and execute the following C code ?

#include<`stdio.h`>    (Please neglect `` this signs)
int main()
{
int x;
for(x=1;x<=5;x++);
printf("%d",x); return 0;
}

4
5
6
Compiler error
None of the above


CDAC CCAT Mock Tests

CDAC-CCAT test 1 (section A)

CDAC-CCAT test 2 (section A)

CDAC-CCAT test 3 (section A)

CDAC-CCAT test 4 (section A)

CDAC-CCAT test 5 (section A)

CDAC-CCAT English test (section A)

CDAC-CCAT test 1 (section B)

CDAC-CCAT test 2 (section B)

CDAC-CCAT test 3 (section B)

CDAC-CCAT test 4 (section B)