OVERVIEW OF COMPUTERS AND C-PROGRAMMING
UNIT-1 : OVERVIEW OF COMPUTERS AND C-PROGRAMMING
1.
Which of the following is used to perform
computations on the entered data?
(A) Memory (B) Processor (C) Input
device (D) Output device
2.
Which of the following is not an input device?
(A) Plotter (B) Scanner (C) Keyboard (D)
Mouse
3.
Which of the following is not an output device?
(a) Plotter (b) Scanner (c) Printer (d) Speaker
4.
Which of the following is used as a primary memory
of the computer?
(a) Magnetic storage device (b) RAM
(c) Optical storage device (d)
Magneto-optical storage device
5.
Which one of the following is a volatile memory?
(a) RAM (b) Auxiliary memory (c) ROM (d)
Secondary memory
6.
Software is defined
as
(a) Set of memory
cells (b) Set of Programs (c) Set of hardware (d) None
7.
Which statement is a valid?
(a) 1KB=1024 bytes (b)
1 MB=2018 bytes
(c) 1 MB=10000 kilobytes (d)
i KB=100 bytes
9. Which of the following is a pictorial representation of an algorithm?
(a) Program (b) Flowchart (c) Algorithm (d) Pseudo code
(a) Interpreter (b) Compiler (c) Assembler (d) Algorithm
11. Which one of the following is known as the ―language of computer ?
(a) Programming language (b) High-level language
(c) Machine language (d) Assembly language
12. translates high level language into machine
(a) Compiler (b) Translator (c) Processor (d) Loader
13. Which of the
following is not a valid variable declaration
(a) int 2class;
(b) int class2; (c) int class_2; (d) int ELSE;
14.
The range of
―unsigned int‖ data
type is
(a) -32768 to 32767 (b) 0 to 65535 (c) -65536 to 65535 (d) -128 to
127
15.
The size of ―long double‖ data type in
16-bit
machine is
(a) 8 bytes (b) 10 bytes (c) 2 bytes (d) 4bytes
16.
The range of ―char‖ data type is
(a) -128 to 127 (b) 0 to 255 (c) -32768
to 32767 (d) None
17.
The size of ―char‖ data type is
(a) 1
byte (b) 2 bytes (c) 4 bytes (d) 10
bytes
18.
The format specifier that is used to read or write a
character is
(a) %f (b) %d (c) %c (d) %s
19.
Which one of the following is a string constant
(a) ‗3‘ (b) “hello” (c) 30 (d) None
(a) Two (b)Four (c) Six (d) Zero
21.
What is the result of 8 | 4 ?
(a) 0 (b) 1 (c) 4 (d) 12
(a) 010010 (b) 011000 (c) 010100 (d) 111001
24. 10<<3 gives
(a) 40 (b) 1 (c) 80 (d) 30
25.
Shifting a number ‗n‘ by ‗s‘ bits to left is
equivalent to which of the following?
(a) 2s/n (b) n/2s (c)
s2/n (d) n*2s
26. Shifting a number ‗n‘ by ‗s‘ bits to right is equivalent to which of the following?
(a) 2s/n (b) n/2s (c) s2/n (d)
n*2s
(a) 43 (b) 34 (c) 31 (d) 41
28.
operators are used for
shifting bits to right and left
(a) >> and
<< (b) > and < (c) ?and : (d) None
29.
The expression a++ is referred as
(a) Pre increment (b) Post increment (c)
Before increment (d) After increment
30. The expression
++a referred as
(a) Pre increment (b) Post increment (c) Before increment (d) After increment
31.
If a=3, b=5 the value of the expression ++a+b++ is
(a) 10 (b) 9 (c) 8 (d)
None of the above
35. String constants are enclosed in
(a) ‗ ‗ (b) “ “ (c) ( ) (d) [ ]
36.
Character constants are enclosed in
(a) „ „ (b) ― ― (c) ( ) (d)
[ ]
37.
The escape sequence character causes the cursor to
move to the next line on the screen
(a) \t (b) \n (c) \r (d)
\v
38.
The assignment statement ―sum=sum+i;‖ is equivalent to
(A) sum=+i; (B) sum+=i; (C) sum= =sum+i; (D) None
39.
sizeof() operator returns the size of an operand in
(A) Bits (B) Nibble (C) Bytes (D) None
40.
Which of the following is the correct way of using
type casting
(A) c=(int)a/b; (B) c=a(int)/b; (C) c=int a/b; (D) None
Related Posts
Subscribe Our Newsletter
nice
ReplyDeleteWe must be prepared to explore different means of implementation inasmuch as there is no perfect system or a "one size fits all" software program. computer technicians
ReplyDelete