0% found this document useful (0 votes)
11 views17 pages

Computer Science Objective Questions

Uploaded by

iamsudhanshu6300
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views17 pages

Computer Science Objective Questions

Uploaded by

iamsudhanshu6300
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

COMPUTER SCIENCE

Objective Questions An ISO9001-2008 Certified Institution

Number system
Multiple Choice Questions:-
1. Unit of measurement used in computer………………..
(a)Byte (b) Megabyte (c) Bits (d) All of these
2. In binary calculations 1 + 1 =………….
(a) 2 (b) 0 (c) 1 (d) None of these
3. Hexadecimal representation of 11 is.
(a) A (b) B (c)C (d) None of these
4. 1 Byte is equal to
(a)1024 bits (b) 656 bits (c) 8 bits (d) 656 bytes
5. 1 Mega Byte is equal to.
(a)8 X 1024 bytes (b) 8 bits (c) 1024 X 1024 bytes (d) 8 Bytes
6. 1 Kilo Byte is equal to…………..
(a)4 bits (b) 8 bits (c) 1024 bytes (d) 8 Bytes
7. Decimal number (25)10 is equal to Binary number(………..)2
(a) 11001 (b) 10101 (c) 10001 (d) 11011
8. How many bits make a half byte?
(a)2 (b) 4 (c) 6 (d) 8
9. Which one of the below is a valid binary number?
(a) 1010 (b) 10120 (c) 120 (d) 459
10. 23 will be written in binary as.
(a)10111 (b) 11111 (c) 10011 (d) 11011
11. The Base of Binary number system is….
(a) 2 (b) 10 (c) 8 (d) 0 & 1
12. The Base of Octal number system is….
(a) 2 (b) 10 (c) 8 (d) 0 & 1
13. A group of 4 bits is called
(a) MB (b) clusters (c) Byte (d) Nibble
14. 1 Byte is equal to
(a) 4 Bits (b) 6 bits (c) 8 bits (d) 10 bits
15. (84)10 is equal to
(a) 1110 1002 (b) 11001002 (c) 10101002 (d) 1101102
16. (14)10 is equal to
(a) 1110 2 (b) 11002 (c) 10102 (d) 11012
17. 1101 series of four bits is known as ………….
(a)Byte (b) Nibble (c) Bit (d) All of these
18. To perform calculation on stored data computer uses………………...
(a) decimal (b) Binary (c)hexadecimal (d) octal
19. 1 MB is equal to
(a)1024 KB (b) 1000 byte (c) 1024 GB (d) 1024 bytes

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 1
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

20. Decimal number system is the group of …………….number.


(a)0 or 1 (b) 0 to 9 (c) 0 to 7 (d) 0 to 9 and A to F
21. There are how many types of number system?
(a) One (b) Two (c) Three (d) Four
22. ASCII code for letter A is…..
(a) 1100011 (b) 1000001 (c) 1111111 (d) 0010011
23. How many unique symbol in hexadecimal number system
(a) 2 (b) 10 (c) 8 (d) 16
24. Using ASCII, How many bits is required for 1 character?
(a) 11 (b) 8 (c) 9 (d) 14
25. How many different characters can ASCII represents
(a) 90 (b) 1024 (c) 128 (d) 54
26. How graphics are represented by the computer
(a) Unicode (b) ASCII (c) Bitmap (d) Binary
27. An organized way of representing number is called..
(a)Character system (b) number system (c) Integer system (d) None of the above
28. Gigabyte is
(a) 210 MB (b) 1024 MB (c) Both (a) and (b) (d) None of the above
29. (84)10 is equal to
(a) 1110 1002 (b) 11001002 (c) 10101002 (d) 1101102
30. The negative number in the binary system can be represented by…..
(a)Sign magnitude (b) 1’s complement (c) 2’s complement (d) All of these
31. Which of the following is invalid hexadecimal number?
(a) A0XB (b) A0F6 (c) 4568 (d) ACDB
32. The most widely used code that represents each character as a unique – 8 bit code is .
(a)ASCII (b) UNICODE (c) BCD (d) EBCDIC
33. Smallest unit of memory is ?
(a) Bit (b) Mega byte (c) Kilo byte (d) byte
34. One Megabyte is equivalent to:
(a) 220 byte (b)230 byte (c) 210 byte (d) None of these
35. When we convert 10010 binary number to decimal. Then the solution is :
(a) 20 10 (b) 18 10 (c) 14 10 (d) 16 10
36. Octal equivalent of hexadecimal code F3A1 is :
(a) 158661 (b)171641 (c)176541 (d)173101
37. Using ASCLL, how many bits is required for 1 character?
(a) 11 (b)8 (c)9 (d)14
38. The binary equivalent of the decimal number 0.4375 is:
(a) 0.1010 (b) 0.1100 (c)0.1011 (d)0.0111
39. 714 in octal is ………… in decimal
(a) 460 (b)406 (c)560 (d)506
40. 1A5E in Hexadecimal is ………………….. in decimal
(a) 6750 (b) 7650 (c)5670 (d)5067

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 2
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

41. The code that is easier to use on punched cards is


(a) ASCII (b) EBCDIC (c) Excess-3 (D) BCD
42. ASCII stands for ………….….
(a) American standard code for information interchange
(b) American special code for information interchange
(c) American standard computer for information interchange
(d) American standard core for information interchange

Short Questions:
1. Find the decimal equivalent of the following binary numbers?
(a)10110 (b)101011 (d)0.111 (g)11001.1101
2. Convert the decimal number into their binary equivalent?
(a)25(b)283(e)38.625 (f)45.4
3. Convert the decimal number into their octal equivalent?
(a)759 (b)1598 (e)22.21875 (f)715.4
4. Convert the binary number into their octal equivalent?
(a)11101 (e)10111.1101 (f)1110.1001 (g)11001.1101
5. Convert the decimal number into their hexadecimal equivalent?
(b)1795(c)47.375 (d)0.875 (g)76
6. Convert the hexadecimal number into their decimal equivalent?
(a)9D (d)2C9.4 (f)9A (g)7D4
7. Convert the hexadecimal number into their binary equivalent?
(a)59F (c)5D.8F (d)CA (f)[Link]
8. Convert the octal number into their decimal equivalent?
(a)235.21 (b)57.2 (f)72.12 (g)76
9. What is 1’s complement? Find the 1’s complement of following negative values:
(a)-13 (b)-4 (c)-18 (d)-6
10. What is 2’s complement? Find the 2’s complement of following negative values:
(a)-13 (b)-4 (c)-18 (e) -17

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 3
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

Fundamental of computer
1. The brain of the computer is the
(a) CPU (b) control unit (c) ALU (d) All of these
2. The first commercial computer delivered to a business client is ……………
(a)ENIAC (b) EDSAC (c) UNIVEC (d) All of these
3. Which memory device is generally made of semiconductors?
(a) RAM (b) Hard disk (c) CD (d) Floppy disk
4. Which of the following is designed to control the operations of a computer?
(a)Application software (b) system software (c) Utility software (d) User
5. A computer language is/are………...
(a)Machine language (b) assembly language (c) high level language (d) All of these
6. Computer system is a combination of …………..and software.
(a) Hardware (b) Program (c) Memory (d) None of these
7. Loading of operating system into main memory is called……………
(a)Pulling (b) Backing (c) Hanging (d) Booting
8. A computer that deals with physical quantities is called ………….Computer.
(a) Analog (b) Hybrid (c) Digital (d) Desktop
9. …....can contain files as well as folders.
(a)Other Files (b) Folder (c) Both a & b (d) None of these
10. A computer cannot ‘ boot’ if does not have the ………...
(a)Operating system (b) Compiler (c) Loader (d) Assembler
11. Computer language used on internet is ………………...
(a)Pascal (b)java (c) basic (d) Logo
12. LISP is designed for.
(a)Artificial intelligence (b) GUI (c) CUI (d) FORTRAN
13. Row facts figures are called……..
(a) Data (b) Item (c) Value (d) Record
14. It is the first program run on a computer, when the computer boots up.
(a) System software (b) Operating system (c) processing system (d) memory system
15. …… is a least expensive medium for strong data and files.
(a) Flash drive (b) disk (c) hard disk (d) Magnetic tape
16. Computer language used for scientific calculation is.
(a) LOGO (b) FORTRAN (c) PASCAL (d) C++
17. The language used for developing of various games is ……………
(a)C (b) C++ (c) SQL (d) java
18. Which of the following is a system software.
(a) Compiler (b) database program (c) word processor (d) spreadsheet
19. An ………………………… converts and executes one statementat a time.
(a)converter (b) interpreter (c) compiler (d) instructor
20. Memory unit that communicates directly with the CPU is called ………...
(a)Register (b) Main memory (c) Secondary memory (d) Auxiliary memory

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 4
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

21. C.P.U. can directly understand this language………………...


(a)C (b) Machine language (c) Assembly (d) NONE
22. The most frequently used instruction of a computer program are likely to be fetched from.
(a)Cache memory (b) RAM (c) ROM (d) HARD disk
23. Cache and main memory will not be able to hold their contents when the power is off that is……..
(a) Dynamic (b) Static (c) Volatile (d) Non- Volatile
24. Which of the following is not a hardware?
(a) Processor chip (b) printer (c) Mouse (d) Java
25. The word data is derived from
(b) Greek (b) Latin (c) Spanish (d) English
26. In MICR, C stands for
(a) Code (b) Color (c) Computer (d) Character
27. What type of devices are computer speakers and headphones
(a) Input (b) Input/output (c) Output (d) Storage
28. What type of device is a digital camera
(a) Input (b) Output (c) software (d) Storage
29. Which of the following is not an output device?
(a) Scanner (b) Printer (c) LCD (d) plotter
30. Which of the following is not an example of hardware?
(a) Scanner (b) Printer (c) LCD (d) Interpreter
31. PMT means
(c) Process map time (b) Page Map Table (c) Pre-Map Time (d) None of the above
32. Icon represents
(a) Window element (b) Software (c) Picture (d) All the above
33. In CPU arithmetic operations are performed in
(a) Temp Register (b) Data Register (c) Accumulator (d) All the above
34. Buses are classified as
(a) Data Bus (b) Address Bus (c) Control Bus (d) ALL the above
35. Linux is a type of ……………… software
(a) Shareware (b) Commercial (c)Open source (d) Hidden Type
36. Fujitsu VP – 400 and Cray X-MP/14 are
(a) Super Computers (b) Mainframes (c) Minicomputer (d) Microcomputer
37. SDRAM means
(a) Static DRAM (b) Synchronous (c) Standard DRAM (d) None of the above
38. An …………………. converts and executes one statement at a time
(a) Converter (b) Compiler (c) Instructor (d) Interpreter
39. PSR means
(a) Process status register (b) Process Register (c) Program scale register (d) None of the above
40. The status register are
(a) CARRY (b) ZERO (c) PARITY (d) all the above

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 5
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

41. PARAM and ANURGare


(a) Minicomputer (b) Supercomputer (c) Mainframe (d) Microcomputer
42. The sector which stores Bootstrap Loader is
(a) Boot Sector (b) Bad Sector (c) Super Block (d) Bit sector
43. Step by step solution of a problem is
(a) Flowchart (b) ER diagram (c) Data flow (d) All the above
44. A cooling device attached to the microprocessor is called
(a) Thermo sink (b) Hydro sink (c) Temper sink (d) Heat sink
45. The commands for which specifications are available within [Link] is
(a) Internal Command (b) External Command (c) Both (a) and (b) (d) None of the above
46. SSI means
(a) Small Scale Institute (b) Sector Scale Intend (c) Small Scale Integration (d) None of the above
47. POST is
(a) Power On Self-Test (b) Power off Send Test (c) Power On Self Trait (d) None of the above
48. Difference Engine was developed by
(a) Darwin (b) Charles Babbage (c) Charles Davis (d) Von Neumann
49. Computer language used on Internet is
(a) Pascal (b) Java (c) Basic (d) Logo
50. SMPS means
(a) Switch mode power supply (b) Switched mode power supply
(c) Switched more power supply (d) all the above
51. PCB means
(a) Power Control Block (b) Power Controlling Block
(c) Process Control Block (d) Process Controlling Block
52. Magnetic disks are
(a) Secondary Storage Memory (b) Primary Memory (c) Volatile Memory (d) all the above
53. Which device permanently store memory
(a) RAM (b) ROM (c) Static RAM (d) None of these
54. Blue ray is a
(a) USB memory (b) pen drive (c) Optical disk (d) None of these
55. AGP means
(a)Access Graphics port (b) Accelerated Graphics port (c) Acceleration Graphics port (d) None
56. WLL means
(a) Wireless in Local Loop (b) Wireless in Long Loop (c) Wireless in Land Loop (d) All of these
57. Which one is impact printer
(a) Dot matrix printer (b) Inkjet printer (c) Thermal printer (d) Electromagnetic printer
58. CRT means
(b) Current ray tube (b) Cathode ray tube (c) Cathode ray technology (d) Current ray technology
59. Who invented the adding machine………….
(a) Blaise Pascal (b) john Napier (c) Leibnitz (d) none

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 6
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

60. DBMS is
(a) Database Management system (b) Database Management System
(c) Data Being Managed System, (d) all the above
61. A …………….. is smallest possible block in magnetic disk.
(a) Block (b) Track (c) Sector (d) Cluster
62. A hard disk is so called because it is hard to ………….
(a) Format (b) Carry (c) Access (d) Handle
63. SMTP means
(a) Simple Mail Trapping Protocol (b) Simple Mail Transport Protocol
(c) Simple Mail Transpose Protocol (d) Simple Mail Transpose Protocol
64. Information is
(a) Processed Data (b) Meaningful data (c) Both (a) and (b) (d) None of the above
65. The first microprocessor was …………...
(a) Intel 4004 (b) 8080 (c) 8085 (d) 4008
66. The Full form of USB is ………….
(a) Universal serial bus (b) Universal size bus (c) Unique serial bus (d) none of these
67. PCI means
(a) Peripheral component Interconnect (b) Peripheral computer Interconnect
(c) Peripheral component Internet (d) Peripheral cable Interconnect
68. Assembler is used as a translator for
(a) C++ (b) COBOL (c) Assembler (d) high level language
69. Magnetic tapes, floppy disk, optical disk, flash memory and hard disk are example of …………...
(a) Auxiliary memory (b) Primary memory (c) Cache memory (d) flash memory
70. The Symbol that is represented using rectangle in a flowchart is ………….
(a) Terminal (b) Decision (c) Activity/ Process (d) Input / output
71. The Symbol that is represented using parallelogram in a flowchart is ………….
(a) Terminal (b) Decision (c) Activity/ Process (d) Input / output
72. Which of the following is not a part of control panel?
(a) My document (b) add and remove program
(c) Date and Time (d) Display
73. Which of the following key is used to refresh the active window
(a) F5 (b) F6 (c) F9 (d) F7
74. ………..is the layer of a computer system between the hardware and the user program
(a) Operating system (b) system environment (c) operating Environment (d) None
75. Which of the following windows version support 54 bit processor ………….
(a) window 95 (b) Window 2000 (c) window XP (d) Window 1998
76. Which special character is use in wild card ………….
(a) (*) (b) (?) (c) Both a and b (d) None of these
77. Who represent the physical and tangible components of the computer………….
(a) Software (b) Hardware (c) Both a and b (d) none

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 7
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

78. MICR is
(a) Magnetic ink character reader (b) Magnetic ink code reader
(c) Magnetic ink cases reader (d) None of these
79. SSI means
(a) Small scale intension (b) Small scale internet (c) Small scale integration (d) None
80. BIOS is stored in ………….
(a) ROM (b) RAM (c) Hard Disk (d) None of these
81. UNIVAC means
(a) Universal Array computer (b) Universal Automatic computer
(c) Unique automatic computer (d) Unvalued automatic computer
82. Icon represents
(a) Window elements (b) software (c) Picture (d) None of the above
83. Laser printer is…………...
(a) Impact printer (b)Non Impact printer (c) Both a and b (d) None
84. The Full form of CVT ………….
(a) Constant voltage transformer (b) Constant volt transfer(c) Cons voltage transform (d) none
85. POST means
(a) Power On Self Test (b) Power Off Self Test
(c) Power off Self Turn (d) Power On Self Turn
86. Fifth generation computer language
(a) ALGOL (b) COBOL (c) LISP (d) SNOBOL
87. The technology used in first generation …………...
(a) Vacuum tube (b) Transistors (c) ICs (d) None
88. A cooling device attached to microprocessor is called
(a) Thermo sink (b) Hydro sink (c) Heat sink (d) Temper sink
89. Example of open source operating system
(a) UNIX (b) LINUX (c) WINDOWS (d) Restricted
90. The language processor are….
(a) Compiler (b) interpreter (c) Assembler (d) All

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 8
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

INTRODUCTION TO C++
1. C++ was developed by………………..
(a)Ken Thompson (b) Dennis Ritchie (c) BajarneStroustrup (d) Pascal
2. Which of the following approach is adapted by C++
(a)Bottom up (b) Top down (c) Both (a) and (b) (d) None of these
3. The smallest individual unit of program is called………….
(a) Keyword (b) Variable (c) Tokens (d) Literal
4. Not Equal to operator is …………….
(a) != (b) == (c) <= (d) None of these
5. Folder is a location where we can store ……………….
(a)Files (b) Other Folders (c) Both a & b (d) None of these
6. The Increment operator (++) is also called ……………..operator.
(a)Unary (b) Relational (c) Arithmetic (d) Binary
7. C++ programs are converted into machine language with the help of
(a)Interpreter (b) Compiler (c) Assembler (d) None of these
8. ………. Function is used to clear the output screen.
(a) getch() (b) main() (c) clscr() (d) clrscr()
9. …….. helps to move to next line..
(a) “\n” (b) “\h” (c) “/n” (d) “\t”
10. Comments in C++ is given by …………
(a)// (b)/* */ (c) Both (a) & (b) (d) None of these
11. ‘==’ Operator is…………Operator.
(a)Assignment (b) Relational (c) Logical (d) None of these
12. …….. helps to compile the program.
(a) Alt + C (b) Alt + R (c) Alt + X (d) None of these
13. Integer Occupies ………Bytes of memory space.
(a)1 (b) 4 (c) 2 (d) 8
14. C++ is an extension to ……… programming language.
(a)Pascal (b) java (c) C (d) B
15. The class definition ends by a……….
(a) } (b) ; (c) , (d) ? ;
16. main () function returns an ………….value in C++.
(a) Char (b) slot (c) float (d) integer
17. getchar() is a…………. based function.
(a) Number (b) Integer (c) Float (d) Character
18. Call by reference is achieved by applying ……………….
(a)Pointer (b) Address (c) Reference (d) Float
19. The last character in a string is a ……….. Character.
(a) NULL (b) 0 (c) Space (d) Subscript
20. puts() is a…………. based function.
(a) String (b) Integer (c) Float (d) Character

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 9
COMPUTER SCIENCE
Objective Questions An ISO9001-2008 Certified Institution

21. A Library is a collection of ……………….


(a)Header (b) Function (c) Files (d) Records

22. “if “ is a …………. Control structure.


(a)Exit (b) Entry (c) Loop (d) Conditional
23. In C++, ‘\n’ in used for……………………..
(a) Horizontal Tab (b) New line (c) Audible sound (d) vertical Tab
24. To calculate remainder in C++ we use………
(a) Mod (b) Rem (c) Remainder (d) %
25. A function can be called either by ………… or …………or both.
(a) Value (b) reference (c) Both (a) and (b) (d) None of these
26. do-while loop is a control loop
(a) Exit (b) Count (c) Entry (d) none of these
27. Conditional operator(s) is/are……………
(a) = = (b) ? : (c) <> (d) All the above
28. for loop is a ……………….controlled loop.
(a) Count (b) exit (c) Conditional (d) None of the above
29. A label is an…………………
(a) Date (b) Keyword (c) Identifier (d) Entity
30. goto is…………………
(a) quit statement (b) Exit statement (c) jump statement (d) all the above
31. An unary operator work with ……………. Operand.
(a) Single (b) Double (c) Triple (d) None of these
32. In C++, the type of operator && is………….
(a) Arithmetic (b) Logical (c) Relational (d) None of the above
33. Built in function gets () belongs to……………….
(a) Iostream.h (b) Stdio.h (c) String.h (d) None of the above
34. The order of evaluation of following expression will be: A+B – C*D
(a) *, -, + (b) +, -, * (c) *, +, - (d) all the above
35. ………………………. operator have the highest precedence
(a) Unary (b) Binary (c) ternary (d) None of these
36. Which operator has the lowest precedence
(a) Assignment (b) comma (c) unary (d) sizeof
37. Which operator have the highest precedence
(a) ++ / - - (b) ! (c) - (d) sizeof
38. The keyword continue is used to ……….. statements
(a) skip (b) break (c) exit (d) none of the above
39. To define user defined data types we use the keyword
(a) typedef (b) rem (c) enum (d) union

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi✆: 9631085086 (Akbar sir) Page 10
COMPUTER SCIENCE
VOL. – 02 (XI) An ISO9001-2008 Certified Institution
Accr. No. M3111204IN

40. The structure definition end by a ……………. .


(a) : (b) / (c) , (d) ;
41. Strcat () function ………….. a source string to the end of destination string.
(a) Erase (b) Append (c) Update (d) delete
42. Strlen() function is used for ………….. ……..
(a) count length of string (b)copy two string (c) compare two string (d) NONE
43. While is a …………. Control structure.
(a) Exit (b) count (c) conditional (d) entry
44. The ……………. is known as value at address operator.
(a) * (b) & (c) . (d) $
45. The …………… operator points to current object being operated upon.
(a) static (b) this (c) inline (d) None of the above
46. A …………….. is used to identify a particular record.
(a) Index (b) Key (c) Tuple (d) All the above
47. The main () function return an ……………. Value.
(a) integer (b) address (c) slot (d) float
48. Index is also known as
(a) Subscript (b) Base (c) Name (d) None of the above
49. for loop can have
(a) One initialization (b) Two initialisation (c) Multiple initialisation (d) None of the above
50. A block in C++ is enclosed by
(a) { } (b) ( ) (c) Both (a) and (b) (d) none of the above
51. Switch statement can be nested
(a) Yes (b) No (c) Yes/No (d) none of the above
52. A register declaration is an …… declaration
(a) Register (b) auto (c) int (d) none of the above
53. If a function does not return a result return type is
(a) int (b) null (c) void (d) zero
54. Instruction given to computer to perform action
(a) Instruction (b) Statement (c) Logic (d) None of the above
55. A loop that never ends
(a) Recursive loop (b) Iterative loop (c) Infinite loop (d) None of the above
56. do-while is
(a) entry controlled loop(b) exit controlled loop(c) count controlled loop (d) all the above
57. Which of the following is the ternary operator?
(a) ? : (b) : ? (c) Both (a) and (b) (d) None of the above
58. Logical operators connect the
(a) symbols (b) statement (c) expressions (d) None of the above

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi-834001 ✆: 9631085086 Page 11
COMPUTER SCIENCE
VOL. – 02 (XI) An ISO9001-2008 Certified Institution
Accr. No. M3111204IN

59. Postfix has higher precedence over prefix


(a) Yes (b) No (c) Situation dependent (d) None of the above
60. In C++, “\b” isused for
(a) Backspace (b) Blank (c) Bold (d) All the above
61. A character constant in C++ must contain one character and be enclosed with
(a) semicolon (b) Double quotation (c) Single quotation (d) none of the above
62. A stream is a sequence of
(a) Bits (b) Errors (c)Logic (d) Bytes
63. Long is
(a) data type (b) integer (c) data type modifier (d) operator
64. A reference is an alternative name of
(a) pointer (b) object (c) structure (d) character
65. Assignment operator is
(a)! = (b) = = (c) < = (d) =
66. A set of arithmetic operators are
(a) +,-,*,/,% (b)>,<,>=,<=, ==,!= (c)&&, ||, ! (d) ?:
67. Which of the following is the symbol for AND operator?
(a) % (b)|| (c)&& (d) ?:
68. The jump statements are
(a) return (b) goto (c) break (d) all the above
69. In C++ programming array index is always starts from
(a) 0 (b) 1 (c) 2 (d) 3
70. While loop checks the condition on
(a) top (b) bottom (c) middle (d) None of these
71. If an array is declared as intarr[5][5], how many elements can store ?
(a) 0 (b) 5 (c) 10 (d) 25
72. In C++ programming ‘\v’ is used for
(a) form feed (b) line brake (c) vertical tab (d) alarm
73. In C++ programming ‘\t’ is used for
(a) form feed (b) line brake (c) vertical tab (d) alarm
74. The keyword used to define a structure is
(a) stru (b) st_struct (c) struct (d) structure
75. The use of break statement in a switch statement is
(a) Optional (b) compulsory (c) to check an error (d) None of these
76. Which operator can not be used with floating point numbers?
(a) + (b) - (c) % (d) /
77. cout is a/an……………………?
(a) operator (b) object (c) function (d) macro

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi-834001 ✆: 9631085086 Page 12
COMPUTER SCIENCE
VOL. – 02 (XI) An ISO9001-2008 Certified Institution
Accr. No. M3111204IN

78. In C++ every statement end with ……………………?


(a) colon(:) (b) semicolon(;) (c) comma(,) (d) dot(.)
79. The program area inside which variable can be accessed is called
(a) boundary (b) scope (c) life span (d) global
80. Two dimentional arrays are stored in
(a) Row-column matrix (b) column-row matrix (c) both (a) and (b) (d) All the above
81. Which of the following sorting algorithm is of divide and conquer type
(b) Bubble sort (b) Insertion sort (c) Quick sort (d) All the above
82. Real numbers are represented by their
(a) mantissa (b) exponents (c) both (a) and (b) (d) all the above
83. Functions helps to reduce
(a) Program sequence (b) Data types (c) Program size (d) Data elements
84. An array can be referenced by a common
(a) Name (b) value (c) relation (d) field
85. Divide by zero is
(a) Representational Error (b) Variable Error (c) Arithmetic run time error (d) All the above
86. C++ is
(a) OOPL (b) Procedural Language (c) Natural Language (d) Event language
87. go to is
(a) Break statement (b) jump statement (c) quit statement (d) exit statement
88. In C++, if j = 5 the value for (5* ++j)%6 is
(a) 1 (b) 2 (c) 0 (d) 3
89. Evaluate S = ++A – A If A = 5.
(a) 0 (b) 1 (c) 2 (d) 3
Short Answer type questions:-
1. Determine which of the following are valid constant and specify their type with size:
”Sonalkumari” =.......... “\a” = ………….. “\ncomputer-sci” = ………….. “Reema/’s” = ……………
‘n’ = ........... “7.45 AM” = ………….. “name” = ………….. “R\’s” = …………… ‘\n’= ………………
2. What data types would you use to represent the following items?
a) The number of students in the class. …………………………………………
b) The population of a city. …………………………………………
c) The average marks in the class. …………………………………………
d) The grade (a letter) attained by a student in the class ……………………….
e) The weight of postage stamp ……………………………………………
f) The registration letter of a car ……………………………………………
g) The area of circle …………………………………………….
h) The distance between two points ……………………………………………
i) The weight of postage stamp ……………………………………………
j) Sum of integer numbers ……………………………………………
k) Mobile number of any person ………………………………………………
Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi-834001 ✆: 9631085086 Page 13
COMPUTER SCIENCE
VOL. – 02 (XI) An ISO9001-2008 Certified Institution
Accr. No. M3111204IN

3. Evaluate the following expressions where a=5, b=3 and c=7,d=2.


(a) f = --a + a * ++b (b)f = ++b * b – a (c)f = a-- + a * b++
(d) f =a-(b++) * (--d) (e)f = --c * c – a (f)f = c++ * ++b
(g) f = a++ + b * a (h) f = c++ + ++c + ++c + c (i) f = (++b) *b-a
(j) f = b++ * b++ + ++a * ++a (k) f = (a++) * ++d + ++a (l) f = (b++) * --b - --a
4. For storing the following data types in the memory, write requirement of bytes
(i) float …….. (ii) double ……… (iii) int …….. (iv) char ………..(v) long double ………. (vi) longint ……….
(vii) long …….. (viii) short ……… (Xi) shortint ……….. (X) bool ………..
5. Evaluate the following C++ arithmetic expression
(a) y=16%2 + 8 * 2/4 -6 (b) y=16/4 -12 * 2 + 5
(c) a= 3/2+3*8/3-3+6/3 (d) a= 2 * 3/4 + 4/4 + 8 – 2 + 5/8;
(e) y=-3* -4 % -6/ -5 (f) y=3 + 4 – 56/5 % 10
(g) a= 3/2+3*8/3-3+1.5/3 (h) a= 4* 4/3 + 3/2 * 4.2 + 2 + 4.2;
(i) y=6/4-2 + 8 * 2/4 -6 (j) y=16/4 -12 % 2 + 5
(k) a= -3 + 4 -7 * 8 / 5%3 (l) a= 6/4 - 12/12 +12/3 * 16/3;
6. What will be the value of following if j = 5 initially?
(a) (5 * ++j) % 6 (b) (5 * j++) % 6 (b) (6 * j++) % 5 (b) (6 * j++) % 5
7. What do the following expressions evaluate to?
(a)17%3 (b)1/2 (c) 12% 5 (d) 3.0/2.0
8. Identify the valid and invalid identifier?
(a) 2Emp (b)Emp_ (c) stud3name (d) A$ (e) (roll) (f) S-name (g)class (h) H123
9. What do the following expressions evaluate to? Assume i to be an int and a to be a float
Operation Result Operation Result

i = 5/2 a = 5/2
i = 5.0/2 a = 5.0/2
i = 5/2.0 a = 5/2.0
i = 5.0/2.0 a = 5.0/2.0
i = 2/5 a = 2/5
i = 2.0/5.0 a = 2.0/5.0
10. What is the header file? Name the header file to which the following built in functions belong

Library files Functions name


(Header files)
<string.h> strcpy(), strcmp(), strcat(),strlen(), strcmpi()
<math.h> fabs(),log(),pow(),sqrt(),sin(),cos(),abs(),random(),frexp(),exp()floor(),fmod()
<ctype.h> isalnum(),isalpha(),isdigit(),islower(),isupper(),tolower(),toupper()
<stdio.h> putchar(), getchar(), gets(), puts(), printf(), scanf(),fprintf(), fscanf(), getc()
<iomanip.h> setw(), endl
<iostream.h> get(), put(),cin,cout, seekg()
<stdlib.h> atoi(),random(),srand(),rand(),randomize(),exit()
<conio.h> gotoxy(), clrscr(), getch(), putch()
<fstream.h> open(), write(), read() etc.

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi-834001 ✆: 9631085086 Page 14
COMPUTER SCIENCE
VOL. – 02 (XI) An ISO9001-2008 Certified Institution
Accr. No. M3111204IN

To find output
a) void main() b) void main()
{ {
intx,y,z; intx,y,z;
x=y=z=1; x=y=z=1;
z=++x || ++y && ++z; z=++x && ++y || ++z;
cout<<x<<y<<z; cout<<x<<y<<z;
} }
c) void main() d) void main()
{ {
intx,y,z; int x;
x=y=z= -1; x=-3+4-7*8/5%10;
z=++x || ++y && ++z; cout<<”x=”<<x;
cout<<x<<y<<z; getch();
} }
a) void main() b) void main()
{ {
int x=5,y=5; int a=5,b=5;
cout<<x++<<”,”; cout<<a++<<", "<<++a;
cout<<--x<<”,”; cout<<b++<<", "<<++b;
cout<<y--<<”,”<<--y; getch();
} }
e) void main() c) void main()
{ {
int a, mb=3,k=4; int a=5;
a= mb * 3/4 + k/4 + 8 – mb + 5/8; cout<<a++<<", "<<++a;
cout<<”a=”<<a; cout<<a++<<", "<<++a;
} }
d) void main() e) void main()
{ {
int x=5,y=5; clrscr();
cout<<x++<<”,”; inti=0;
cout<<--x<<”,”; cout<<i++<<" "<<i++<<” “<<i++<<endl;
cout<<y++<<”,”<<--y; cout<<++i<<" "<<++i<<” “<<++i<<endl;
getch(); getch();
} }
f) void main(); g) void main()
{ {
int x=5,y=5; int n=5;
cout<<x--<<”,”; cout<<”Line 1:”<<++n<<endl;
cout<<--x<<”,”; cout<<”Line 2:”<<n++<<endl;
cout<<y--<<”,”<<--y; cout<<”Line 3:”<<++n<<endl;
getch(); getch();
} }

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi-834001 ✆: 9631085086 Page 15
COMPUTER SCIENCE
VOL. – 02 (XI) An ISO9001-2008 Certified Institution
Accr. No. M3111204IN

f) void main() g) void main()


{ {
int j=30; inti=5;
cout<<j--<<endl; int j=11;
cout<<++j<<endl; cout<<”in”<<11+j%i;
} }

h) void main() i) void main()


{ {
int a=1,b=5; int a=500,b=100,c;
b++; if(!a>=400)
if (b==5) b=300;
cout<<”value is five” c=200;
else cout>>”b=”<<b<<”c=”<<c;
cout<<”value is not five”; }
}

j) void main() k)
{ void main()
intval,res,n=1000; {
cin>>val; int a=10,b=6,c=4,r;
res =n+val>1750?400:200; r=(((a<b)&&(a>c))||(b+7>c-3));
cout<res; cout<<r;
} }
If val =2000If val = 1000 If val = 500

l)
a) void main() void main()
{ {
int x=10,y=100%90; inti=0;
if(x!=y); cout<<i++<<" "<<i++<<” “<<i++<<endl;
cout<<”x=”<<x<<”y=”<<y; cout<<++i<<" "<<++i<<” “<<++i<<endl;
} getch();
}

b) void main() m) void main()


{ {
int x=2,y=3,z=4,r; int x=3,z;
r=!(((x<=y)&&(z==x))||(y!=z)); z= x++ + ++x;
cout<<r; cout<<x<<endl;
} cout<<z;
}

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi-834001 ✆: 9631085086 Page 16
COMPUTER SCIENCE
VOL. – 02 (XI) An ISO9001-2008 Certified Institution
Accr. No. M3111204IN

a) void main() b) void main()


{ {
for(inti=1; i<=10;++i ) for(inti=1; i<=10;++i )
{ {
if(i%3)==0) if(i%3)==0)
break; continue;
else else
cout<<i<<endl; cout<<i<<endl;
} }
} }
c) void main() d) void main()
{ {
for(int a=1;a<20;a++); inti=5;
cout<<a; for( ;i<10; )
} i++
cout<<i;
}
e) void main() a) void main()
{ {
int v1=0,v2=5; for(inti=1; ; )
for(inti=1;i<=2;i++) {
{ cout<<i<<” “;
cout<<++v1<<”\t”<<v2--<<endl; if(i==128)
cout<<v2<<”\t”<<v1++<<endl; break;
} i*=2;
} }
}
f) void main() g) void main()
{ {
int A=10; int j;
while(++A<15) for(inti=10;i<=50;i+=10)
{ j=i/2;
cout<<A++; cout<<j<<" ";
} } }
1. How many times will the while loop run?
2. What will be the Last value of A ?
h) void main() i) void main()
{ {
int s=0; int s;
for(inti=2;i<=15;i++) for(inti=1;i<=5;i++)
{ {
s =s + i; s =pow(i,i);
cout<<i<<" "<<s; cout<<i<<" "<<s;
} }
} }

Max Foundation, B. S. Bhawan, Near Jharkhand Hospital, KantaToli, Ranchi-834001 ✆: 9631085086 Page 17

You might also like