C-CAT Test Paper 5 (Section B)

Sr No Questions Answers
Sr No Questions Answers
01 The decimal equivalent of 1011 is.
(a) 21
(b) 11
(c) 10
(d) 12
02 The _______ is useful device to obtain the computer output in the form of graphs or drawings.
(a) Graph plotters
(b) Graphic pens
(c) OCR
(d) Punch Cards
03 ______ holds data as the CPU works with it.
(a) Processor
(b) Memory
(c) Processor and Memory
(d) None of these options
04 In a floppy, the circular plate coated with magnetic oxide, is divided into ______ and these are further divided into _____.
(a) sectors, tracks
(b) tracks, sectors
(c) circles, sectors
(d) ovals, circles
05 Which of these is not a output device.
(a) Monitor
(b) Plotter
(c) Keyboard
(d) Projector
06 Source code analysis tools functions as ______________
(a) Design screens ,menus ,reports etc.
(b) Testing and debugging of programs
(c) Optimising programs by Pointing out unreachable lines of code
(d) Generate source code from design given
07 The principle task of a command language is:
(a) To initiate execution of programs
(b) To access the system functions
(c) To cause an interrupt
(d) None of these options
08 _______is a program execution.
(a) Procedure
(b) Process
(c) Algorithm
(d) All of these options
09 ______ is the smallest unit of data.
(a) Frame
(b) Header
(c) Byte
(d) Bit
10 In the third generation of computers which of the following type of machines was introduced?
(a) Mini computers
(b) Micro computers
(c) Main frame Computers
(d) Super computer
11 ______Gate is the Universal gate
(a) NAND
(b) OR
(c) AND
(d) NOR
12 A small high speed memory which is used to increase the speed of processing is_____
(a) RAM
(b) ROM
(c) Cache Memory
(d) None of these options
13 The transistor technology was introduced in ___________ generation.
(a) First generation
(b) Third generation
(c) Second generation
(d) Fourth generation
14 ________ is concerned with the decision to temporarily remove a process from the system.Which of these is not a output device.
(a) High level scheduling
(b) Low Level scheduling
(c) Medium Level scheduling
(d) None of these options
15 Pictorial representation of an Algorithm is _________
(a) flowchart
(b) algorithm
(c) graphics
(d) procedure
16 The programming language that was designed for specifying algorithm.
(a) Address
(b) ASCII
(c) ALGOL
(d) None of these options
17 A table used to define clearly the word statement of a problem in a tabular form is_______.
(a) Design table
(b) Decoder
(c) Decision Table
(d) Debugging
18 The flow lines are represented by the symbol of.
(a) Arrows
(b) Oval
(c) Circle
(d) Rectangle
19 Language Primarily used for internet-based applications.
(a) ADA
(b) C++
(c) JAVA
(d) FORTRAN
20 Machine language has two part format the first part is__________ and the second part is __________
(a) OPCODE,OPERAND
(b) OPERAND,OPCODE
(c) DATA CODE,OPERAND
(d) OPERAND,CODEOP
21 The process of incorporating changes in an existing system to enhance, update its features is_________.
(a) System Maintenance
(b) System Valuation
(c) System evaluation
(d) None of these options
22 The errors that occur in computer program is________.
(a) Syntax error
(b) Logical error
(c) Semantic Errors
(d) All of these options
23 The errors that occur in computer program is________.
(a) Syntax error
(b) Logical error
(c) Syntax error and Logical error
(d) None of these options
24 _________language that enables users to define there requirements for extracting required information.
(a) Query
(b) Manipulation
(c) DDL
(d) DML
25 The file organization method that can be used with magnetic tape storage is:
(a) Direct
(b) Sequential
(c) Indexed Sequential
(d) None of these options

26 Which of the following are keywords of the "C" language?
i.if
ii.else
iii.then
iv.elseif
(a) All are keywords
(b) only i,ii and iii are keywords
(c) only i,ii and iv are keywords
(d) only i and ii are keywords

27 The largest permissible magnitude of an integer constant is:
(a) same as the octal integer number
(b) same as the short integer number
(c) same as integer
(d) None of these options

28 The expression, a = 7/22 * (3.14 + 2) * 3/5; evaluates to
(a) 8.28
(b) 6.28
(c) 3.14
(d) 0

29 The Output of the following code is:
#include
void main( )
{
float a = 1, b;
int m = 3, n = 5;
b = (a ? m : n)/2.0;
printf ("%3.1f ", b);
}
(a) 1.0
(b) 5.0
(c) 1.5
(d) 3.0

30 Which statement sets the 3rd lowermost bit of an unsigned integer x to 0, leaving other bits unchanged?
(a) ^3;
(b) x|(~3);
(c) x&(~3);
(d) x&3;

31 What is the output of the following code?
#include<stdio.h>
void main()
{
int a = 32, b = 66;
if (a, b) printf("\n%d",a);
else printf("\n%d",b);
}
(a) 32
(b) 66
(c) Compile Time error
(d) Runtime Error

32 What is the output of the following code?
#include<stdio.h>
void main()
{
int a = 20;
printf("%d",a + `F`);
}
(a) Error
(b) 20
(c) 90
(d) garbage value

33 The statement that compares the value of an integer called sum against the value 65, and if it is less, prints the text string "Sorry, try again", is
(a) if( sum < "65" ) printf("Sorry, try again" );
(b) if( sum <= 65 ) printf("Sorry, try again" );
(c) if( 65 == sum ) printf("Sorry, try again" );
(d) if( sum < 65 ) printf("Sorry, try again" );

34 What is the output of the following code?
void main()
{
int s=3,score=200;
switch(s)
{
case 1:
printf("\n %d ",score + 1);
case 2:
printf("\n %d\t",score + 2);
case 3:
printf("\n %d\t",score + 3);
case 4:
printf("\n %d\t",score + 4);
case 5:
printf("\n %d\t",score + 5);
}
}
(a) 203
(b) 203 207 212
(c) 203 204 205
(d) None of these options

35 What is the output of the following code?
aaa()
{
printf("hi");
}
bbb()
{
printf("hello");
}
ccc()
{
printf("bye");
}
main()
{
int (*ptr[3]) ();
ptr[0]=aaa;
ptr[1]=bbb;
ptr[2]=ccc;
ptr[3]=();
}
(a) hi
(b) hello
(c) bye
(d) error

36 When a function is called in C and parameters are passed into the routine, the variables passed by
(a) reference
(b) value
(c) address
(d) None of these options

37 Sending a copy of data to a program module is called _____.
(a) Recursion
(b) Passing a reference
(c) Passing a value
(d) None

38 What will happen if you assign a value to an element of an array whose subscript exceeds the size of the array?
(a) The element will be set to 0
(b) Nothing, its done all the time
(c) Other data may be overwritten
(d) Error message from the compiler

39 The statement int n[4] = { 11, -13, 17, 105}
(a) assigns the value 17 to n[3] is wrong;
(b) it gives an error message
(c) assigns the value 17 to n[2]
(d) assigns the value -13 to n[2]

40 What will happen if you try to put so many values into an array when you initialize it that the size of the array is exceeded?
(a) Nothing
(b) Possible system malfunction
(c) Error message from the compiler
(d) Other data may be overwritten

41 How can I dynamically allocate a two-dimensional array?
(a) int **array1 = (int **)malloc(nrows * sizeof(int *)); for(i = 0; i < nrows; i++) array1[i] = (int *)malloc(ncolumns * sizeof(int));
(b) int **array2 = (int **)malloc(nrows * sizeof(int *)); array2[0] = (int *)malloc(nrows * ncolumns * sizeof(int)); for(i = 1; i < nrows; i++) array2[i] = array2[0] + i * ncolumns;
(c) int *array3 = (int *)malloc(nrows * ncolumns * sizeof(int));
(d) Any of the above.

42 #include<stdio.h> void main() { int I=10,*p=&I,**q=&p; printf("%u",***(&(*(&Q)))); } What is the output of this program?
(a) value of p is printed
(b) address of p is printed
(c) value of I is printed
(d) address of I is printed

43 What is the output of the following code?
#include<stdio.h>
void main()
{
int arr[]={0,1,2,3,4,5,6};
int i,*ptr;
for(ptr=arr+4,i =0; i<=4; i++)
printf("\n%d",ptr[-i]);
}
(a) Error
(b) 6 5 4 3 2
(c) 0 garbage garbage garbage garbage
(d) 4 3 2 1 0

44 This pointer for any class internally declared as
(a) int *this;
(b) X *thid;
(c) const X *this;
(d) X *const this;

45 #include<stdio.h>
void prg(int);
main()
{
int a=10,j=3,i=2;
prg(a);
a*=( i + j );
printf("%d",a);
}
void prg(x)
{
int x;
int k=2;
x*=k;
return (x);
}
What is the output of this program?
(a) 10
(b) 20
(c) 50
(d) None of these

46 Consider the program segment given below. (The italicized numbers represent program line numbers) :
1. #include<stdio.h>
2. int y;
3. void main()
4. {
5. int x,*px,**ppx;void f1(int *);
6. x = 10;
7. y = 1000;
8. px = &x;
9. ppx = &px;
10. f1(px);
11. printf("%d",*px);
12. }
13. void f1(int *p)
14. {
15. *p = 20;
16. printf("%d",*p);
17. }
The printf() at line 11 prints the value:
(a) 10
(b) 1000
(c) 20
(d) None of these options

47 Consider the declaration :
struct sample
{
unsigned int a;
unsigned int b;
};
struct sample v;
The size of v.b is
(a) 1 bit
(b) 6 bits
(c) 5 bits
(d) None of the above

48 The correct way for a structure in C to contain a pointer to itself is
(a) typedef struct { char *item; NODEPTR next; } *NODEPTR;
(b) struct node { char *item; struct node *next; }; typedef struct node *NODEPTR;
(c) Both are correct.
(d) None of above.

49 The main purpose of declaring a union.
(a) To allow the same storage location to store data of different data types at different times.
(b) To use it instead of structure.
(c) To allow the same storage location to store data of different data types at the same time.
(d) None of the above

50 The operation for adding an entry to a stack is traditionally called:
(a) Add
(b) Append
(c) Insert
(d) Push

No comments:

Post a Comment