C-CAT Test Paper 4 (Section B)

Sr No Questions Answers
Sr No Questions Answers
01 The input interfaces transforms the data into _________code.
(a) hexa
(b) binary
(c) octal
(d) decimal
02 The following is not a type of computers.
(a) Analog
(b) Digital
(c) Hybrid
(d) Logical
03 ______ holds data as the CPU works with it.
(a) Processor
(b) Memory
(c) Processor and Memory
(d) None of these options
04 The connectivity channel between CPU and Memory is________.
(a) BUS
(b) Cache Memory
(c) Control Unit
(d) None of these options
05 Which of these is an electronic card.
(a) Magnetic Strip Card
(b) Smart Card
(c) ATM Card
(d) Punch Card
06 The branch that deals with systematic application of the principles of computer science is________
(a) computer engineering
(b) software engineering
(c) IT engineering
(d) None of these options
07 ___________ is a multi tasking system.
(a) MS-DOS
(b) Unix
(c) Linux
(d) None of these options
08 ________ is used by operating system to map file names to their corresponding file attributes and file data, and also to provide greater flexibility to users in file naming.
(a) Directories
(b) Diary
(c) Paging
(d) File
09 ______ is the smallest unit of data.
(a) Frame
(b) Header
(c) Byte
(d) Bit
10 The job of the _____ layer in OSI model is to provide node-to-node communication and to hide all the details of the communication subnet from the session layer.
(a) Data-Link
(b) Physical
(c) Transport
(d) Presentation
11 Which of these keys belong to QWERTY keyboard.
(a) Numeric Keypad
(b) null
(c) Alphanumeric Keys
(d) All of these options
12 Which of the following is true in regard to Work station.
(a) Data
(b) Database
(c) Computer
(d) Main Memory
13 SCSI Interface helps in.
(a) Extends the computer`s Bus outside the computer
(b) Analog to Digital and Digital to Analog Conversions
(c) Projects information from a computer on a large screen
(d) It is an Interface unit between I/O device and Ports
14 Which of these is not a output device.
(a) Monitor
(b) Plotter
(c) Keyboard
(d) COM
15 _______ is not a network type.
(a) DAN
(b) WAN
(c) LAN
(d) MAN
16 _____ contains the addresses of all the records according to the contents of the field designed as the record key.
(a) Index
(b) Subscript
(c) Array
(d) File
17 A sequence of precise and un ambiguous instructions for solving a problem in a finite number of operation is___________.
(a) ALGOL
(b) Algorithm
(c) Procedure
(d) None of these options
18 ___________ symbol is used to show data transmission from one location to other.
(a) Annotation
(b) Offline Storage
(c) Merge
(d) Communication Link
19 __________ is the analysis tool used for planning program logic.
(a) Protocol
(b) None of these options
(c) PROLOG
(d) Pseudocode
20 A language which allows instructions to be represented by letters (i.e abbrevation) is_______
(a) Machine language
(b) Assembly Language
(c) Scientific Language
(d) Programming language
21 Language wherein Encapsulation and Abstraction of data is done is called as:
(a) Assembly Language
(b) Object oriented programming Language
(c) Pascal language
(d) Cobol
22 During system evolution __________ is to be considered .
(a) Time analysis
(b) Ease of maintenance
(c) Failure rate
(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 Standard methods of organizing data are:
(a) File-oriented approach
(b) Database-oriented approach
(c) File-oriented approach and Database-oriented approach
(d) Object Oriented approach
25 A file management system typically supports the following types of files, EXCEPT:
(a) Transaction file
(b) Storage file
(c) Master file
(d) Backup file

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 All of the following are C basic data types except:
(a) int
(b) float
(c) char
(d) Union

28 void main()
{
int A=0, B=0, C=0, D=0;
if((A==B)&&(A*B<=B))
{
if(D==1) C=1;
else
if(A==1) C=2;
}
else
C=3;
if((B==0)&&(A==B)&&(A!=1))
D=1;
}
What are the final values of C and D?
(a) 1 0
(b) 0 0
(c) 0 1
(d) 1 1

29 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;

30 What is the output of the following code?
void main()
{
int a=0, b=2, x=4, y=0;
printf("\n%d\t,",(a==b));
printf("\n%d\t,",(a!=y));
printf("\n%d\t,",(b<=x));
printf("\n%d\t,",(y > a));
}
(a) 0, 0, 0, 0,
(b) 0, 0, 0, 1,
(c) 0, 0, 1, 1,
(d) 0, 0, 1, 0,

31 What is the output of the following code?
#include<stdio.h>
void main()
{
char str1[]="India", str2[]="India";
if(str1==str2)
printf("\nBoth the string are same");
else
printf("\nBoth the string are not same");
}
(a) Both the string are same
(b) Both the string are not same
(c) Compile Time error
(d) Runtime Error

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

33 What is the output of the following code? #include<stdio.h> void main() { int s=0; while(s++<10) { if(s<4 && s<9) continue; printf("\n%d\t",s); } }
(a) 1 2 3 4 5 6 7 8 9
(b) 1 2 3 10
(c) 4 5 6 7 8 9 10
(d) 4 5 6 7 8 9

34 The break statement is used to exit from:
(a) an if statement
(b) a for loop
(c) a program
(d) the main() function

35 I have a function extern int f(int *); which accepts a pointer to an int. How can I pass a constant by reference?
(a) f(&5);
(b) int five = 5; f(&five);
(c) int five = 5; f(five);
(d) f(5);

36 What is the output of the following code?
#include <stdio.h>
main()
{
void swap();
int x=10, y=8;
swap(&x, &y);
printf("x=%d y=%d",x,y);
}
void swap(int *a, int *b)
{
*a ^= *b, *b ^= *a, *a ^= *b;
}
(a) x=8 y=10
(b) x=10 y=8
(c) Null value
(d) Error

37 Recursive Functions
(a) Are necessary to solve a certain class of problems
(b) Take less main storage space
(c) Are executable faster than iterative ones
(d) None

38 What is the output of the following code? #include<stdio.h> void main() { int arr[2][3][2]={{{2,4},{7,8},{3,4},}, {{2,2},{2,3},{3,4}, }}; printf("\n%d",**(*arr+1)+2+7); }
(a) 16
(b) 7
(c) 11
(d) Error

39 Unions are different than structures in that
(a)
(b)
(c)
(d)

40 What is the difference between the 5`s in these two expressions? int num[5]; num[5];
(a) first is particular element, second is type
(b) first is array size, second is particular element
(c) first is particular element, second is array size
(d) both specify array size

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