Top Banner
MGM’s JNEC Question Bank Subject: Computer Engineering 1. All of the following are examples of computer input units EXCEPT: a) Scanner b) Speaker c) Bar code reader d) Keyboard Answer: b 2. Which of the following units is the biggest capacity? a) Byte b) Kilobyte c) Gigabyte d) Megabyte Answer: c 3 The difference between memory and storage is that the memory is__________ and storage is_________ a) Temporary, permanent b) Permanent, temporary c) Slow, fast d) None of the above Answer: a 4 Which of the Following holds the ROM, CPU, RAM and expansion cards a) Hard disk b) Floppy disk c) Mother board d) None of the above Answer: c 5 The language that the computer can understand and execute is called ______ a) Machine language b) Application software c) System program d) None of the above Answer: a
28

Computer Engineering FE MCQ

Jul 21, 2016

Download

Documents

bijukumarg
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computer Engineering FE MCQ

MGM’s JNEC

Question Bank

Subject: Computer Engineering

1. All of the following are examples of computer input units EXCEPT:

a) Scanner

b) Speaker

c) Bar code reader

d) Keyboard

Answer: b

2. Which of the following units is the biggest capacity?

a) Byte

b) Kilobyte

c) Gigabyte

d) Megabyte

Answer: c

3 The difference between memory and storage is that the memory is__________ and storage

is_________

a) Temporary, permanent

b) Permanent, temporary

c) Slow, fast

d) None of the above

Answer: a

4 Which of the Following holds the ROM, CPU, RAM and expansion cards

a) Hard disk

b) Floppy disk

c) Mother board

d) None of the above

Answer: c

5 The language that the computer can understand and execute is called ______

a) Machine language

b) Application software

c) System program

d) None of the above

Answer: a

Page 2: Computer Engineering FE MCQ

6 Which of the following devices can be used to directly input printed text

a) OCR

b) OMR

c) MICR

d) None of the above

Answer: a

7 A floppy disk contains

a) Circular tracks only

b) Sectors only

c) Both circular tracks and sectors

d) None of the above

Answer: c

8 Actual executions of instructions in a computer take place in

a) ALU

b) Control Unit

c) Storage unit

d) None of the above

Answer: a

9 Which of the following is used as a primary storage device

a) Magnetic tape

b) PROM

c) Floppy disk

d) None of the above

Answer: b

10 Information retrieval is faster from

a) Floppy disk

b) Magnetic tape

c) Hard disk

d) None of the above

Answer: c

11 C is_________

a) An assembly language

b) A third generation high level language

c) A machine language

d) None of the above

Page 3: Computer Engineering FE MCQ

Answer: b

12 The errors that can be pointed out by the compiler are

a) Syntax errors

b) Semantic errors

c) Logical errors

d) None of the above

Answer: a

13 Developer of C is --------

a) Martin Richards

b) Ken Thomson

c) Dennis Ritchie

d) Kernighan Answer: c

14) After compilation of _____ code, _____ code is obtained to execute the any C program.

a) Source, Object

b) main, object

c) object, main

d) object, source

Answer: a

15) __________ unit maintains the co-ordination of computer system.

a) ALU

b) Memory

c) CU

d) Hard disk Answer: c

16 An algorithm is defined as

a) a mathematical formula that solves a problem.

b) a tempo for classical music played in a coda.

c) a logical sequence of a steps to solve a problem.

d) a tool that designs computer programs and draws the user interface.

Answer: c

17 What does the diamond shape flowchart symbol represent?

a) input/output

b) terminal

Page 4: Computer Engineering FE MCQ

c) decision

d) connector

Answer: c

18 Rectangle is used for input and output statement

a) True

b) False

Answer: b

19 Algorithm should be machine independent

a)True

b)False

Answer: a

20 ---- Symbol is used to represent input and output statement.

a) Diamond

b) Hexagon

c) Rectangle

d) Parallelogram

Answer: d

21 Documentation section is used to write ----

a) User defined functions

b) Library files

c) Information about program

d) main function

Answer: c

22 ---- is the extension for header file

a) .header

b) .h

c) .txt

d) .c

Answer: b

23 C program statements end up with

a) Fullstop

b) Comma

c) Colon

Page 5: Computer Engineering FE MCQ

d) Semicolon

Answer: d

24 _____ is the extension for C program

a) .header

b) .h

c) .txt

d) .c

Answer: d

25 printf statement is used to displaying string on console

a) True

b) False

Answer: a

26 stdio.h refers to standard __________ file.

a) Standard I/O header

b) stabd alone I/O header c) Student I/O header

d) all of the above Answer: a

27 __________ file contains different predefined functions, which are required to run the program.

a) IO file

b) Header file c) Both a & b

d) none of above Answer: b

28 All header files should be included explicitly ______function.

a) before main ( )

b) after main( )

c) anywhere in programmer

d) all of the above Answer: a

29 ________ function is the starting point of the program.

a) Any function

b) # include()

Page 6: Computer Engineering FE MCQ

c) main

d) all of the above Answer: c

30 The prototypes of library functions are gathered together into various categories and stored in

_________ files.

a) Header

b) Std I/O

c) both a and b

d) none of above

Answer: a

31 The _______ of a program is linked with libraries that are needed for execution of a program.

a) Object code

b) source code

c) Object & source code

d) any code

Answer: a

32 Scanf ( ) function is the part of _______ header file.

a) Conio.h

b) input.h

c) math.h

d) stdio.h

Answer: d

33 To user getch( ) in program _____ header file must be included in linking section.

a) Conio.h

b) input.h

c) math.h

d) stdio.h

Answer: a

34 Any variable declare before main are called as _____ variables

a) Global

b) Local

c) Both a & b

d) Non of above

Answer: a

Page 7: Computer Engineering FE MCQ

35 The C program structure is in the sequence of ____

a) Documentation,Linking ,main function

b) Linking,documentation,main function

c) documentation,main function,linking ,

d) none of above

Answer: a

36 __________ process convert source program into object program.

a) Linking

b) Compilation

c) Conversion

d) All of the above

Answer: b

37 Character constant is declared in ---

a) Single quote

b) Double quote

c) Curly braces

d) Round braces

Answer: a

38 Which of the following is not a datatype

a) int

b) float

c) string

d) char

Answer: c

39 String constant is declared in ---

a) Single quote

b) Double quote

c) Curly braces

d) Round braces

Answer: b

40 In C there are --- keywords

a) 24

b) 108

c) 32

d) None of above

Answer: c

Page 8: Computer Engineering FE MCQ

41______ are the reserved words whose meaning is already known to compiler.

a) Linking

b) main function

c) Keyword

d) None of above

Answer: c

42_____ are the reserved words whose meaning is already known to compiler.

a) Linking

b) main function

c) Keyword

d) None of above

Answer: c

43______is a single alphabet or a digit or a special symbol enclosed in a single quote.

a) constant

b) variable

c) Character constant

d) None of above

Answer: c

44 Integer type of data occupies ______ bytes of memory .

Constant

a) 1

b) 2

c) 4

d) None of above

Answer: b

45A character type data occupies ____ bites of memory .

a) 8 bits

b) 4 bits c) 2 bits,

d) Any of the above

Ans: a

Page 9: Computer Engineering FE MCQ

46 ____ symbolic constant is used for new line.

a) \t

b) \n

c) \nl

d) None of above

Answer: b

47 ______ operators are used to assign the value to variable.

a) Assignment

b) Mathematical

c) both a & B

d) None of above Answer : a

48 i++ and ++i will provide the same output.

a. True

b. False

Answer : b

49 To check more than one condition at a time ____ operator is primarily used to check more than two

conditions.

a. Mathematical

b Logical

c a & b

d none of above

Answer : b

50 _____ operators operate on single operand.

a. Unit

b Logical

c. Uniary

d. All of above

Answer: c

DATA INPUT OUTPUT, DECISION CONTROL

AND LOOP CONTROL STRUCTURE

Page 10: Computer Engineering FE MCQ

1. To print out a and b given below, which of the following printf() statement will you use?

#include<stdio.h>

float a=3.14;

double b=3.14;

a. printf("%f %lf", a, b);

b. printf("%Lf %f", a, b);

c. printf("%Lf %Lf", a, b);

d. printf("%f %Lf", a, b);

Ans:- a

2. The single character input/output function are?

a. scanf() and printf()

b. getchar() and printf()

c. scanf() and putchar()

d. getchar() and putchar()

Ans:-d

3. Precedence determines which operator?

a. Is evaluated first

b. Is most important

c. Is fastest

d. Operates on the largest number

Ans:-a

4. The two operator && and || are?

a. Arithmetic operators

b. Equality operators

c. Logical operators

d. Relational operators

Ans:-d

Page 11: Computer Engineering FE MCQ

5. What will be the output of following code?

#include<stdio.h>

#include<conio.h>

void main()

{

int x=10,y=20;

clrscr();

if(x==y)

printf(“%d%d”,x,y);

getch();

}

a. Garbage value

b. Raise a error

c. Prints nothing

d. None of above

Ans:-c

6. What is the output of the following program?

#include<stdio.h>

#include<conio.h>

void main()

{

int a=8,b=4;

int c,d;

clrscr();

c= a>6;

d= a>2 && b==3;

printf("c = %d, d= %d",c,d);

getch();

}

a. c=1, d=0

Page 12: Computer Engineering FE MCQ

b. c=0,d=1

c. c=0,d=0

d. Compilation error

Ans:- a

7. What is the output of the following program?

#include<stdio.h>

#include<conio.h>

void main()

{

int i=10;

clrscr();

switch(i)

{

case 1: printf(" i=1");

break;

case 10: printf(" i=10");

case 11: printf(" i=11");

break;

case 12: printf(" i=12");

}

getch();

}

a. i=10 i=11 i=12

b. i=1 i=10 i=11 i=12

c. i=10 i=11

d. none of the above

ans:-c

Page 13: Computer Engineering FE MCQ

8. What is the output of the following program?

#include<stdio.h>

#include<conio.h>

void main()

{ char c = 'c';

clrscr();

switch(c)

{

case 'a' : printf("inside case a,");

break;

case 'b' : printf("inside case b,");

break;

case 'c' : printf("inside case c,");

case 'd' : printf("inside case d,");

continue;

default: printf("inside default case");

break;

}

getch();

}

a. inside case c, inside case d

b. inside case c

c. inside case c, inside case d, inside default case

d. Compilation Error

Ans:-d

9. How many times "IndiaBIX" is get printed?

#include<stdio.h>

#include<conio.h>

void main()

{

int x;

clrscr();

for(x=-1; x<=10; x++)

Page 14: Computer Engineering FE MCQ

{

if(x < 5)

continue;

else

break;

printf("IndiaBIX");

}

getch();

}

a. Infinite times

b. 11 times

c. 0 times

d. 10 times

Ans:-c

10. How many times the while loop will get executed if a short int is 2 byte wide?

#include<stdio.h>

#include<conio.h>

void main()

{

int j=1;

clrscr();

while(j <= 255)

{

printf("%c %d\n", j, j);

j++;

}

getch();

}

a. Infinite times

b. 255 times

c. 256 times

Page 15: Computer Engineering FE MCQ

d. 254 times

Ans:-b

11. Which of the following is not logical operator?

a. &

b. &&

c. ||

d. !

Ans:-a

12. In mathematics and computer programming, which is the correct order of mathematical

operators ?

a. Addition, Subtraction, Multiplication, Division

b. Division, Multiplication, Addition, Subtraction

c. Multiplication, Addition, Division, Subtraction

d. Addition, Division, Modulus, Subtractio

Ans:-b

13. Which of the following cannot be checked in a switch-case statement?

a. Character

b. Integer

c. Float

d. Enum

Ans:-c

14. Give the out put of the following code

#include<stdio.h>

#include<conio.h>

void main()

{

int x=3;

Page 16: Computer Engineering FE MCQ

float y=3.0;

clrscr();

if(x==y)

printf("x and y are equal");

else

printf("x and y are not equal");

getch();

}

a. x and y are equal

b. x and y are not equal

c. x and y are same

d. none of above

Ans:-a

15. When do we use the case control structure?

a. To choose one from multiple alternatives

b. To switch from the instruction to another

c. To make the execution fast

d. None of above

Ans:-a

16. What will be the output of the program?

#include<stdio.h>

#include<conio.h>

void main()

{

char suite=3;

clrscr();

switch(suite)

{

case 1: printf("ALL QUIZ");

Page 17: Computer Engineering FE MCQ

case 2: printf("All Quiz is great");

default: printf("All quiz cintain MCQS");

}

printf("did you like all quiz ?");

getch();

}

a. All QUIZ

b. All quiz is great

c. All quiz contains MCQS

d. All quiz contains MCQS did you like all quiz?

Ans:-d

17. What will be the output of following program

#include<stdio.h>

#include<conio.h>

void main()

{

int c=3;

clrscr();

switch(c)

{

case '3': printf("Hi");

break;

case 3: printf("Hello");

break;

default: printf("How are u ?");

}

getch();

}

a. Hi

b. Hello

c. Hi & Hello

Page 18: Computer Engineering FE MCQ

d. How are u?

Ans:-b

18. What will be the output of following program?

#include<stdio.h>

#include<conio.h>

void main()

{

int i=3;

clrscr();

switch(i)

{

case 0: printf("I am Here");

case 1+0: printf("I am in Second case");

case 4/2: printf("I am in third case");

case 8%5: printf("Good bye");

}

getch();

}

a. All case statements will be executed

b. I am Here

c. Good bye

d. I am in third case

Ans:-c

19. What will be the output of the following program?

#include<stdio.h>

#include<conio.h>

void main()

{

int suite=1;

Page 19: Computer Engineering FE MCQ

clrscr();

switch(suite);

{

case 0: printf("Its morning time");

case 1: printf("Its evening time");

}

getch();

}

a. Error

b. Its morning time

c. Its evening time

d. None of above

Ans:-a

20. In a for loop, if the condition is missing,then?

a. it is assumed to be present and taken to be false

b. it is assumed to be present and taken to be true

c. it result in the syntax error

d. execution will be terminated abruptly

Ans:-b

21. In a for loop, if the condition is missing, then infinite looping can not be avoided by a

a. Continue statement

b. goto statement

c. return statement

d. break statement

Ans:-a

22. Choose the correct statement

a. 0 represent a false condition

b. Non zero value represent a false condition

Page 20: Computer Engineering FE MCQ

c. 1 represent a false condition

d. Anything that is not 1, represents a false condition

Ans:-a

23. Which of the following comments about for loop are not correct? a. Index value is retained outside the loop

b. Index value can be changed from within the loop

c. goto can be used to jump,out of loop

d. Body of the loop can not be empty

Ans:-d

24. Which of the following comment about for loop are correct?

a. Using break is equivalent to using a goto that jumps to the statement immediately following the

loop

b. Continue is used to by pass the remainder of the current pass of the loop

c. if comma operator is used,then the value returned is the value of the right operand

d. All of above

Ans:-d

25. Break statement can be simulated by using ?

a. goto return

exit

any of the above statement

Ans:-a

26. What will be the output of the following program?

#include<stdio.h>

int main()

{

int i=2,j=2;

while(i+1?--i:j++)

printf("i=%d j=%d",i,j);

return 0;

}

a. 1,2

b. 1,2

Page 21: Computer Engineering FE MCQ

0,2

c. 1,2

0,2

-1,2

d. 1,2 0,2 0,3

Ans:-a

27. Which of these selection statements test only for equality? a) if

b) switch

c) Both a & b

d) None of the mentioned

Ans:-b

28. Which of these are selection statements in Java? a) if()

b) for()

c) continue

d) break

Ans:-a

29. Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?

a) do-while

b) while

c) for

d) None of the mentioned

Ans:-a

30. The keyword ‘break’ cannot be simply used within: a) do-while

b) if-else

c) for

d) while

Page 22: Computer Engineering FE MCQ

Ans:-b

31. Which keyword is used to come out of a loop only for that iteration? a) break

b) continue

c) return

d) None of the mentioned

Ans:-b

32. Which keyword can be used for coming out of recursion? a) break

b) return

c) exit

d) Both (a) and (b)

Ans:-b

33. The output of the code below is

#include <stdio.h>

void main()

{

int i = 0, k;

label: printf("%d", i);

if (i == 0)

goto label;

}

a. 0

b. Infinite 0

c. Nothing

d. Error

Ans:-b

Page 23: Computer Engineering FE MCQ

34. Example of iteration in C. a) for

b) while

c) do-while

d) All of the mentioned

Ans:-d

35. Number of times while loop condition is tested is, i is initialized to 0 in both case. while (i < n)

i++;

-------------

do

i++;

while (i <= n);

a) n, n

b) n, n+1

c) n+1, n

d) n+1, n+1

Ans:-d

36. Which loop is most suitable to first perform the operation and then test the condition? a) for loop

b) while loop

c) do-while loop

d) None of the mentioned

Ans:-c

37. What is the output of this C code?

#include <stdio.h>

int main()

{

for (int i = 0;i < 1; i++)

printf("In for loop\n");

}

a) Compile time error

Page 24: Computer Engineering FE MCQ

b) In for loop

c) Depends on the standard compiler implements

d) Depends on the compiler

Ans:-c

38. Which among the following is odd one out? a) printf

b) fprintf

c) putchar

d) scanf

Ans:-d

39. For a typical program, the input is taken using. a) scanf

b) Files

c) Command-line

d) None of the mentioned

Ans:-d

40. The value of EOF is_____. a) -1

b) 0

c) 1

d) 10

Ans:-a

41. What is the use of putchar()? a) The character written

b) EOF is an error occurs

c) Nothing

d) Both a & b

Ans:-d

42. putchar(c) function/macro always outputs character c to the a) screen

Page 25: Computer Engineering FE MCQ

b) standard output

c) depends on the compiler

d) Depends on the standard

Ans:-b

43. which of the following statement is use to take the control to the beginning of the loop?

a. Exit

b. Break

c. Continue

d. None of these

Ans:-c

44. A do-while loop is useful when we want that the statement within the loop must be

executed?

a. Only once

b. At least once

c. More than once

d. None of above

Ans:-b

45. What will be the out put of the following program?

a. Prints nothing

b. Raise an error

c. Garbage value

d. Allquiz

Ans:-a

46. what will be the output of the following program?

#include<stdio.h>

void main()

Page 26: Computer Engineering FE MCQ

{

Int I;

For(i=1;i<=5;printf(“%d”,i))

i++;

}

a. Error

b. Garbage values

c. 1 to 5

d. Infinite loop

Ans:-d

47. what will be the output of the following program?

#include<stdio.h>

void main()

{

Int x=4;

while(x==1)

{

X=x-1;

Printf(“%d”,x);

x--;

Page 27: Computer Engineering FE MCQ

}

a. 4

b. 1,2,3,4

c. Prints nothing

d. None of above

Ans:-c

48. What will be the output?

#include<stdio.h>

Int main()

{

Int k=35;

Printf(“%d%d%d”,k==35,k=50,k>40);

}

a. 35,50,40

b. 0,50,0

c. 0,0,0

d. 1,1,1

Ans:-b

49. What will be the output? #include<stdio.h>

void main()

{

int a=8,b=4;

int c,d;

c= a>6;

d= a>2 && b==3;

printf("c = %d, d= %d",c,d);

}

a. C=1,d=0

b. C=0,d=0

c. C=0,d=1

Page 28: Computer Engineering FE MCQ

d. Compilation error

Ans:-a