0% found this document useful (0 votes)
20 views

Chapter 1to5 Class10

Uploaded by

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

Chapter 1to5 Class10

Uploaded by

Usman Ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Chapter#1

Introduction To Programming – MCQ’s


Choose the correct answer
1. A series of instructions given to the computer to
solve any kind of problem is called:
a. Program
b. Operation
c. Computing
d. Process
2. Computer programs are also known as:
a. Software
b. Procedure
c. Algorithm
d. Computing
3. The process of feeding or storing instructions in
the computer is known as:
a. Flowchart Designing
b. Computer Programming
c. Data Processing
d. Problem Solving
4. The person who knows how to write a computer
program correctly is known as:
a. Programmer
b. Operator
c. Manager
d. Designer
5. C language was developed by____ between 1969
and 1973 at Bell Labs.

a. Von-Neumann
b. Bjarne Stroustrup
c. Charles Babbage
d. Dennis Ritchie
6. Which of the following is a C language IDE?
a. Visual Studio
b. Xcode
c. Code :: Block
d. All
7. An IDE typically consists of:
a. Text editor
b. Compiler
c. Debugger
d. All
8. IDE stands for:
a. Integrated Digital Environment
b. Integrated Desktop Environment
c. Integrated Development Environment
d. Internal Disk Error
9. A ____ is a software that is used to write and edit
computer programs.
a. Text Editor
b. Compiler
c. Debugger
d. Loader
a. Editor
10. C programs are converted into machine
language with the help of:
a. Editor
b. Compiler
c. Debugger
d. Loader
11. The syntax errors in a program are checked by:
a. Compiler
b. Text Editor
c. Linker
d. Loader
12. A set of rules to write instructions in a
programming language is known as:
a. Syntax
b. Semantic
c. Rules
d. Keywords
13. A ______occurs when the rules of the
programming language are not followed.
a. Syntax error
b. Runtime error
c. Logical error
d. Program error
14. What is the name for the words that have
predefined meanings and cannot be used as variable
names?
a. Auto words
b. Reserved words
c. Restricted words
d Predefined words
15. Another name for a keyword is:
a. Reserved word
b. Special words
c. Restricted word
d. Auto word
16. All keywords in C are written in:
a. Upper case
b. Title case
c. Lowercase
d. a or b
17. const, double, and int are examples of:
a. Comments
b. Reserved Words
c. Header files
d. Identifiers
18. Which of the following is not a reserved word?
a. if
b. Float
c. goto
d. void
19. If a reserved word is used as variable name, it
causes _____error.
a. Syntax
b. Logical
c. Runtime
d. Program
20. The place to write header files in C program is:
a. Top of the program
b. Bottom of the program
c. Middle of the program
d. Anywhere
21. C contains ____ header files.
a.5
b. 10
c. 15
d. Many
22. Header files in C contain:
a. Keywords
b. Library functions
c. Comments
d. Operators for files
23. stdio stands for:
a. Standard input output
b. Symbolic input output
c. Simple input output
d. String input output
24. The name of header file can be written between:
a. [ ] b. ( )
c. < >
d. << >>
25. The extension of the header file is:
a. .cpp
b. .txt
c. .c
d. .h
26. Which header file contains information about
standard input/output functions?
a. stdio.h
b. math.h
c. time. h
d. string.h
27. Which of the following header files contains
information about common mathematical functions?
a. stdio.h
b. math.h
C. conio.h
d. arith.h
28. The main () is a:
a. Header File
b. Comment
c. Function
d. Expression
29. Which of the following functions must be
included in all C programs?
a. start ()
b. system()
c. main()
d. program()
30. Which of the following is used to indicate the
start and end of the main () function body?
a. { and }
b. ( and )
c. BEG and END
d. -> and <-
31. For every opening brace in a C program, there
must be a:
c. Closing brace
b. Comma
c. Colon
d. Period
32. C statement ends with a:
a. Period (.)
b. Comma (,)
c. Semicolon (;)
d. Slash (/)
33. ______ are the statements that are ignored by the
compiler and are not executed.
a. Comments
b. Header files
c. Variables
d. Functions
34. The place to write comments in the C program is:
a. Top of the program
b. Bottom of the program
c. Middle of the program
d. Anywhere
35. In C language, anything after // on the same line
is considered as:
a. Header File
b. Comment
c. Keywords
d. Variable
36. Single line comment in C language start with:
a. #
b. //
c. *\
d. /*
37. Multiline comments in C language end with:
a. #
b. //
c.*\
d. */
38. In C language, the comments can be written in a
program between:
a. { }
b./* */
c. |* *|
d. < >
39. Which of the following is a correct comment in C
language?
a. //comment
b. /* comment */
c. | *comment* |
d. both a and b
40. A quantity whose value cannot be changed
during program execution is called:
a. Constant
b. Variable
c. Keyword
d. Address
41. In C, ______ are the values that include a decimal
point.
a. Integer Constants
b. Real Constants
c. Character Constants
d. String Constants
42. In C, ______ are the values without a decimal
point.
a. Integer Constants
b. Real Constants
c. Character Constants
d. String Constants
43. _____is a single alphabet, digit or special symbol
enclosed within single quotes.
a. Integer Constants
b. Real Constants
c. Character Constants
d. String Constants
44. In C, character constants are written within:
a. Double quotes (“)
b. Single quotes (‘)
c. Exclamation points (!)
d. Pound signs (#)
45. Which of the following is a valid example of
character constant?
a. ‘A’
b. ‘9’
c. ‘$’
d. All
46. A location in computer memory with some data
that can be changed is called:
a. Constant
b. Variable
c. Keyword
d. Address
47. Variables are created in:
a. RAM
b. ROM
c. Hard disk
d. USB
48. The data type int stores:
a. Whole numbers
b. Numbers with fraction part
c. Comments
d. Strings
49. Data type int takes______ bytes.
a. 10
b. 6
c.4
d. 16
50. Which of the following is used to declare
variables that can hold real numbers?
a int
b. float
c. real
d. char
51. The number of bytes used by float data type in C
is:
a. 2
b.4
c. 12
d. 16
52. char is used to declare a variable type of:
a. Integer
b. Character
c. Real
d. Float
53. The number of bytes used by char data type in C
is:
a. 2
b. 1
c. 12
d. 16
54. Which of the following is not a valid data type in
C?
a. float
b. int
c. real
d. char
55. Variable names cannot begin with:
a. Number
b. Underscore
c. Upper-case letter
d. Lower-case letter
56. The variable names cannot contain:
a. Digits
b. Underscore
c. Alphabets
d. Period
57. Which of the following is an invalid variable
name?
a. _cust_num
b. Jan 2009
c. dayOfWeek
d. 2dGraph
58. Which of the following is a valid variable name?
a. points_scored
b. my var
c. $cost
d. case
59. Which of the following is required to declare a
variable?
a. Comment
b. Variable name
c. Data type
d. Both b & c
60. Which symbol is used to separate each variable
while declaring many variables in one statement?
a. Commas(,)
b. Colons(:)
c. Semicolons(;)
d. pipes{|)
61. Which of the following is an invalid statement for
variable declaration?
a. unsigned int marks:
b. Int a, b, c;
c. float salary:
d. char x; y; z;
62. Which of the following C declaration statements
is invalid?
a. int points_scored;
b. char grade;
c. float height;
d. real area;
Chapter #2
1. A GW-BASIC program line cannot have more than
______________?
a.400
b.200
c.255
d.300
2. The mode which is used to type programs:
direct mode
Safe mode
Normal mode
Indirect mode
How many types of variables?
1
2
3
4
Which statement send output to the printer?
DATA
PRINT
LIST
L PRINT
The maximum length of a variable name in GW-BASIC
is:
45
40
31
32
Which command to use to exit from GW-BASIC
Programmer?
RUN
SYSTEM
QUIT
EXIT
Which is a valid variable name?
978
32 A
3$
TTV3
Which statement is used to send output to the monitor?
LPRINT
READ
DATA
PRINT
A file that contains specific instructions, or statements for
the computer is called:
Information
Program
Data
Personal life
When a floating-point value is converted to an integer
the faction part:
My be truncated or rounded off
Round off
Conversion is impossible
Truncated
Which of the following command continues the program
whose execution was terminated temporarily?
Continue
CONT
START
RESTART
BASIC is a language:
Low level
Machine
Assembly
High level
Which of the following is a type declaration character for
an integer variable?
!
@
$
%
Which statement is used to assign value to the variable,
during the execution of the program?
LET
READ/DATA
All of these
In GW-BASIC which of the following key is used to save
file or program?
F3
F4
F5
F2
A variable must be start with a
Digit
Alphabet or underscore
Underscore
Alphabet
Which of the following operators has the highest
precedence?
=
^
*
+
Which command generate automatic line number?
RD
DEL
AUTO
EDIT
GW-BASIC can operate in
Two – Mode
Three mode
Several mode
One mode
Every statement in BASIC must be started with:
Special character
Line Number
Character
Letter
There can be maximum_____________ lines in GW
BASIC program.
9000
3456
65529
6000
A GW-BASIC program line cannot have more than:
255 Characters
455 characters
155 characters
355 characters
Chapter #3
DIM P(4,3) statement reserved the memory spaces:
11
None of these
13
12
Subscript / Index can be:
Negative number
Positive number
None of these
Less then zero
A string array is declared by using its name, preceded by
_____ sign.
#
None
$
!
The double subscripted variable P (2,3) Specifies the
data element present in.
Column 3 and Column 2
Column 2 and Row 3
Column 3 and Row 2
Row 3 and Row 2
In two dimensional array the subscripts are separated
by:
Comma
Colon
All
Semicolon
Maximum Number of element per dimension is:
10
None of these
255
32767
DIM is a
All
Declare if values greater than 11
Dimension statement
Reserved word
in two dimensions array when dimension is not
mentioned, the array should not have more than
___________ elements.
110
10
100
121
One dimensional array consist of:
Set
Vector
Geometry
Expression
A collection of subscripted variable with same variable
name is:
Both a and b
Array
Variable
None
___________ has been used to enter data into 2-D
Array.
Nested loop
WHILE…WEND
None of these
FOR……NEXT
An array is a collection of variable then can store data of:
Both a and b
None
Different types
Same types
N$(5) can store values.
5
4
3
6
The elements of the array are accessed with reference
to their position number which is called:
Index
Memory location
Unsubscripted variable
Superscript
An element of array is mentioned by its .
Name of element
array
subscript
object
The statement DIM C (30 , 50) would reserves.
150 location
1500 location
1800 location
80 location
z(2,2) is an example of dimension array.
Two
One
Three
Four
There are ______ types of array.
0
None of these
2
1
In GW-BASIC the maximum number of dimensions of an
array is:
55
155
355
255
Which of the following is not a valid subscript?
A(2)
B(u)
NUM
A {-2}
Chapter#5
____________ is a collection of field to provide
information about an entity in a file.
Information
Record
File
Data
Argument given to the function subprogram may be a:
Constant value
All of these
Expression
Variable
Function TAB is used at certain column position x on
screen
PRINT
Write
None
READ
Output of FIX (-15.75) is.
15
-15
16
-16
User define function may be numeric or
______________
None of these
Digit
Fractional part
STring
The reserved area of main memory where data file is
opened is called.
Buffer
Register
RAM
Hard disk
__________ statement is not allowed in the direct mode.
AUTO
DEF FN
PRINT
List
Which function returns a natural logarithm of a positive
integer x?
RND function
BEEP function
LOG function
SPC function
The group of related characters that form a unit of
information is called
Program file
Data field
Data file
Records
To store data into a data file, the file must open with
_________ mode.
Output
Indirect
Input
Direct
Which function is used to find the length of data item or
records?
COUNT()
EOF()
LEN()
SUM()
Which statement is used to write data into data file?
WRITE #
LET
Input
READ/DATA
A GOSUB is used to invoke a _________
Function
Subroutine
large
Program
GOSUB and GOTO statement are_______
Same
All of these
Medium
Different
The ____________ function is used to convert ASCII
codes to its character equivalent.
CHAR
CHR$()
CHR()
CHAR$()
How many types of subprograms in GW BASIC.
4
3
2
1
Which statement is used to define a user-defined
function?
All of these
ON GOSUB
GOSUB/RETURN
DEF FN
By using the subprogram of modular approach, the
program can be easily.
Debugged
Modified
Designed
All of these
Trigonometric ratios are calculated in
Integer
Double precision
Single precision
String
The purpose of which function is to return the absolute
value of the expression?
SQR function
FIX function
INT function
ABS function

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy