You are on page 1of 4

P-1

AL-Razi Publications Lahore Sure Short Guess

Paper for COMPUTER 2024 Class-10th


14. The functions in the standard ______input from the user. (/ 3)
Multiple Choice Questions library are called ___. (/ 5) (A) int (B) float
(A) User-defined (B) Built-in (C) char (D) First three
1. The ____ part of the for loop 27. What w il l be the value of
runs first. (/ 8) (C) Repetition based
(D) Iterative variable a after that part of the
(A) Conditional (B) Body code is executed? (/ 3)
(C) Initialization (D) Functions 15. char cd () {return='a';} This Int a = 3;
function contains ____"char". (/ 5)
2. Include statements are written float b = 2.2;
in ____ section. (/ 7) (A) Body (B) Return Type a = a - b;
(A) Header (B) Main (C) Hey (D) Argument Minutes (A) 8.8 (B) 0.8 (C) 8.0 (D) 8.2
(C) Comments (D) Print 16. ____ refers to the transfer of 28. What happens if the condition
3. scanf is ___ in c language. (/ 6) code to another function. (/ 5)
in the if statement is not fulfilled?
(A) Keyword (B) Library (A) Calling (B) Defining (/ 3)
(C) Function (D) None (C) Rewriting (D) Including (A) The program stops.
4. There are _____ types of control 17. To initialize a variable we use (B) An index out of bounds error occurs
statements in c language. (/ 6) _____ operator. (/ 4) (C) The rest of the code starts running
(A) 2 (B) 3 (C) 4 (D) 5 (A) (B) = (C) @ (D) ? (D) Compiler calls to change the
5. If the size of the array is 100 18. The _____ structure is always
then the range of indices will be condition
used to repeat a set of 29. Which of these conditions
____. (/ 6) instructions over and over again.
(A) 0-99 (B) 0-100 indicates that c is a factor of a or
(/ 4) not? (/ 3)
(C) 1-100 (D) 2-2012
6. If a function body contains three (A) Loop (B) Conditional (A) a%c==o (B) c%a==o
return statements, _____ of them (C) Control (D) Data (C) a*c==o (D) a+c==o
will be executed. (/ 6) 19. Functions can be built-in or 30. The default control structure of
(A) One (B) Two ____. (/ 4)
the C language is: (/ 3)
(C) Three (D) First and last (A) Admin Defined
(A) Random control
7. A software that helps a (B) Server Defined
programmer write computer (C) User defined (D) Both a and b (B) Sequential control
programs is called ____. (/ 5) 20. The val ues pass ed to the (C) Conditional control
(A) Compiler (B) Editor function are called _____. (/ 4) (D) Repetition control
(C) IDE (D) Debugger (A) Bodies (B) Return Types 31. Loop within a loop is called:
8. Which of these lines of code is (C) Hey (D) Argument (A) while loop (B) do while loop
correct? (/ 5) (C) for loop (D) nested loop
2 1 . Th e a dv a nta ge s of us i n g
(A) int = 20 (B) grade = 'A'; functions are ____. (/ 4) 32. elements of an array stored at
(C) line = this is a line (D) None (A) Readability (B) Reusability _____ locations in memory are
9. Which of these operators has safe. (/ 3)
the highest priority? (/ 5) (C) Ease of debugging
(A) Attached (B) Scattered
(A) / (B) = (C) > (D) ! (D) First three
22. ____ is software that converts (C) Distributed (D) None
10. operator is used to calculate 33. Readability helps code to
______%. (/ 5) program files into code that a
machine can understand and run. (/ 3) _____. (/ 3)
(A) Percentage (B) Remainder (A) To understand (B) To change
(C) Factorial (D) Square (A) Compiler (B) Editor
(C) IDE (D) Debugger (C) Debugging (D) First three
11. Conditional logic helps in
23. ____Values that do not change 34. A list of words that are already
____. (/ 5)
while the program is running. (/ 3) defined and that the program
(A) Decisions (B) Repetitions cannot use as names of its
(C) Traversing (D) First three (A) Variables (B) Constants variables is called ____. (/ 2)
12. If an if statement contains (C) Strings (D) Comments (A) Auto words (B) Keywords
another if statement, then this 24. A float uses ____bytes of
memory. (/ 3)
(C) Restricted words
structure is called ______. (/ 5) (D) Pre-defined words
(A) Nested (B) Boxed (A) 3 (B) 4 (C) 5 (D) 6 35. print f ______type to print data
(C) Repeated (D) Exposed 25. ____is considered a container is used. (/ 2)
13. _____ makes it easier to write for storing constants. (/ 3) (A) int (B) float
and read values in an array. (/ 5) (A) Box (B) Jar (C) char (D) First three
(A) Loops (B) Conditions (C) Variable (D) Collection 36. Which of these is not a type of
(C) Expressions (D) Functions 26. getch() is used to get option operator? (/ 2)
P-2

(A) Arithmetic operator (B) Divide and conquer (D) None of these
(B) Relational operator (C) Synthesis (D) Deduction 59. Who created the c-language?
(C) Check operator 49. A _____ is a block of (/ 1)
(D) Logical operator statements that performs a (A) Kathleen (B) Jeff Beddoes
specific task. (/ 2)
37. Which of these characters is (C) Thomas Curtner
(A) Function
correct in C language? (/ 2) (D) Dennis Ritchie
(B) Selection Structure 60. combines all the major
(A) "here" (B) "a"
(C) Conditional Structure (D) Hey programming tools to form: (/ 1)
(C) 'a' (D) None 50. The input of the function is
38. C Which option is correct (A) Programming Environment
called ____. (/ 2)
about language? (/ 2) (B) Text Editor
(A) Return Receive
(A) c is not a case-sensitive language (C) IDE (D) Program Centex
(B) Arguments
(B) Can use keywords as names 61. In C language there _______
(C) Parameters (D) Procedure
of variables 51. _____ defines the inputs and types of loop structure. (/ 1)
(C) All logical operators are binary outputs of the function. (/ 2) (A) 2 (B) 3
(D) None (A) Function Definition (C) 4 (D) 5
39 . The C la ngua ge prov ide s (B) Function Declaration 62. GUI stands for: (/ 1)
_____ functions to display output. (C) Function Signature (A) Graphical user interface
(/ 2) (D) Function Initialization (B) Graphical user interaction
(A) scanf (B) print f 52. The following is a selection (C) Graphical uniform interface
(C) main (D) auto statement: (/ 2) (D) Graphical uniform interaction
40. ______ statements specify the (A) if statement 63. Which of the following is a text
order in which program (B) if-else statement editor program: (/ 1)
statements will be executed. (/ 2) (C) both a and b (A) Notepad (B) Text Edit
(A) Loop (B) Conditional (D) else statement (C) WordPad (D) All
(C) Control (D) First three 53. Every programming language 64. Which of these is IDE of C
41. A condition can be any has some basic building blocks programming language? (/ 1)
_____expression. (/ 2) that adhere to some programming (A) code :: Blocks (B) Dave C++
(A) Arithmetic (B) Relational principles called ____. (/ 1)
(C) X-Code (D) All of these
(C) Logical (A) Programming Rules 65 . The C la ngua ge prov ide s
(D) Arithmetic, relational or logical (B) Syntax _____ functions to take input from
4 2 . Ac c o r d i n g t o _ _ _ _ _ , a l l (C) Structural Elements the user. (/ 1)
statements are executed in the (D) Semantic Rules (A) scanf (B) print f
given order. (/ 2) 54. _____ is used in the service (C) main (D) auto
(A) Repetition control code to further define the 66. printf is a ____ function to
(B) Conditional control algorithms and procedures used display the output on the screen.
(C) Sequential control by the program. (/ 1) (/ 1)
(D) Random control (A) Messages (B) Signals (A) Main function
43. Array is a____structure. (/ 2) (C) Comments (D) Explanations (B) User defined function
(A) Loop (B) Control 55. A series or list of instructions (C) Built-in function
(C) Data (D) Conditional is called: (/ 1) (D) Return function
44. _____ is a unique identifier (A) Hardware (B) Software 67. printf derives its name from
that refers to an array. (/ 2) (D) Operating System _____. (/ 1)
(A) Data type (B) Array name (C) Firmware (A) print functions (B) print formatted
(C) Array size (D) None 56. The process of storing (C) print form (D) print free
45. Arrays can be initialized ____ instructions in a computer is 68. It is used to format data in
of the declaration. (/ 2) called: (/ 1) input and output operations: (/ 1)
(A) Time (B) After (A) Comments (B) IDE (A) printf (B) scanf
(C) in side (D) both a and b (C) Programming (D) Syntax (C) format specifier
57. A person who knows how to (D) escape sequence
46. Using loops within loops is w ri te a c om pute r progra m is
called ____loops. (/ 2) 69. A format specifier is preceded
called: (/ 1) by a ____ sign. (/ 1)
(A) for (B) while (A) System Analyst (A) % (B) & (C) = (D) !
(C) do-while (D) nested (B) Computer Program
47. To initialize an array in a 70. The format specifier for the int
(C) Computer Designer data type is: (/ 1)
statement it _____initialize the
declaration. (/ 2)
(D) Computer Operator (A) %c (B) %f (C) %d (D) %t
(A) Time (B) After 58. Programmers write computer 71. The format specifier for a float
(C) First (D) Both a and b programs in special languages data type is: (/ 1)
48. The strategy of solving a big called: (/ 1) (A) %d (B) %f (C) %c (D) %i
problem by dividing it into small (A) Special Program 72. The format specifier for a
parts is called ______. (/ 2) (B) English Programme character data type is: (/ 1)
(A) Analysis (C) Programming language (A) %d (B) %c (C) %i (D) %f
P-3

73. The escape sequence consists widely used data structures. (/ 1) input from the user. (/ 1)
of _____characters. (/ 1) (A) Loop (B) Control Statements (A) scanf (B) printf
(A) 2 (B) 3 (C) 4 (D) 5 (C) array (D) function (C) input (D) output
74. Which of these statements will 85. _____ is a data path that can 97. Each program executes: (/ 1)
run? (/ 1) hold multiple values of the same (A) input (B) output
int a = 5; data type. (/ 1) (C) main (D) inverse
if(a<10) (A) Array (B) Loop 98. Ba sical ly C language has
a ++; (C) Control Structure ____functions. (/ 1)
if (a > 4) (D) Conditional Structure
a- -; (A) Two (B) Three
86. A feature of an array is that it (C) Four (D) None
(A) a ++; (B) a - -; ____stores all values in computer
(C) First both (D) None 99. Functions that are present in
memory. (/ 1) C's standard library are called
75. A set of multiple instructions
enclosed in parentheses is called (A) Separately (B) Together ____functions. (/ 1)
a _____. (/ 1) (C) Intermittently (D) None (A) User-defined (B) Built-in
(A) Box (B) List 87. An array of int type containing
seven days wages of a laborer, (C) Admin Defined
(C) Block (D) Job how to declare it: (/ 1) (D) System Defined
76. We control program continuity 100. Functions that the
by ______. (/ 1)
(A) int daily_wage=[7];
(B) int daily_wage={7}; programmer defines are called
(A) Program body
(C) int daily_wage=[7], ____functions. (/ 1)
(B) Program code
(D) int daily_wage=(7); (A) User-defined (B) Built-in
(C) Control Statements
88. Putting values in an array for (C) Admin Defined
(D) Data Types the first time is called array____.
77. Statements that help us decide (D) Auto Defined
(/ 1)
which statements should run next Subjective Type (Part I)
based on conditions are called (A) Declaration (B) Initialization
_____. (/ 1) (C) Definition (D) Storage 1. What is Array Initialization?
(A) Sequential (B) Selection 89. Each element of an array is a Write a synopsis. (/ 14)
(C) Random (D) Repetition ____ by writing it with the name of 2 . Wh a t a r e f un c t i o n s ? G i v e
the array we can access the data examples. (/ 13)
7 8 . Th e r e a re _ _ _ _ _ t yp e s o f of the array. (/ 1) 3. What are User Defined
conditional statements. (/ 1) (A) Name (B) Size Functions? (/ 12)
(A) 2 (B) 3 (C) 4 (D) 5 (C) Index (D) Structure 4. What are control statements
79. By creating a condition 90. An important contribution of used for? (/ 10)
through the _____ statement, we arrays is that _____ as an index 5. How does the if else statement
can assign code to it. This code can be used. (/ 1) work? Write its structure as well.
runs onl y i f the c o ndi ti on i s (/ 9)
fulfilled, otherwise it does not run. (A) Name (B) Variables
(C) Constants (D) Data type 6. How many types of functions
(/ 1) are there? Write the names. (/ 9)
91. If we have to repeat one or
(A) if (B) if-else more statements, we use ____. 7. What are built-in functions? (/ 9)
(C) if-else-if (D) if-then 8. How is the function used? Or
(/ 1)
80. if (condition) structure how the function is called? Give
(A) Functions (B) Hey an example. (/ 9)
contains if: (/ 1) (C) Selection Structure 9. What is the difference between
(A) Variable (B) Constant (D) Loops parameter and argument? (/ 9)
(C) Keyword (D) Pointer 92. There are ____types of loops 10. What is the use of nested
81. If we want to assign more than in the C language. (/ 1) selection structure? (/ 9)
one statement to a if statement, (A) 2 (B) 3 (C) 4 (D) 5 11. How are arrays declared? (/ 9)
we write them inside _____. (/ 1) 93. A good strategy for solving 12. How do sequential control
(A) Box (B) Block any problem is to break it down statements work? (/ 8)
(C) Wave (D) List into ______parts. (/ 1) 13. What are selection or
82. If we want one set of (A) Two (B) Three conditional statements? (/ 8)
instructions to be executed only if (C) small (D) large 14. What is the function of return
a condition is fulfilled otherwise within a function? (/ 8)
another set will be executed then 94._____use a divide-and-conquer
15. What is meant by a "for" loop?
in such case w e use _____ strategy to solve a programming Describe its structure. (/ 8)
statement. (/ 1) question. (/ 1) 16. What is meant by tested loop?
(A) if (B) if-else (A) Array (B) Data Structure Structure it. (/ 8)
(C) if-else-then (D) if-then (C) Control Structure 17. What are the types of control
83. _____is a container used to (D) Functions statements? Write the name. (/ 7)
store a collection of items in a 95. The ______function is used to 18. Diffe rence betw een unary
display anything on the computer operator and binary operator.
particular order. (/ 1)
screen. (/ 1) (/ 7)
(A) Data field (B) Data structure (A) #include (B) scanf 19. How the if statement works.
(C) Data type (D) None (C) printf (D) user defined Describe this structure. (/ 7)
84. _ __ __ i s one of the m os t 96. _____is a function used to take 20. What is meant by IDE? (/ 7)
P-4

21. What is meant by keywords? 55. What is meant by comments in 90. Write a program to define an if
(/ 7) C-program? (/ 3) statement. (/ 1)
22. How can we declare a 56. What are character constants? 91. Write a program that takes the
variable? (/ 7) (/ 3) percentage input of the student
23. What are the advantages of 57. What is meant by variable? (/ 3) and prints a pass if the percentage
using functions in programming? 58. What is meant by initialization is greater than 50. (/ 1)
(/ 7) of a variable? (/ 3) 92. Write a program that takes the
24. What is meant by the signature 59. Write the difference between following input from the user and
of a function? (/ 7) “Char” and “int”. (/ 3) calculates the gross salary of an
25. What does a text editor do? (/ 6) 6 0 . W ha t i s m e a nt by form a t employee. (/ 1)
26. What does the compiler do? (/ 6) specifier? (/ 3) 93. Write a program that takes a
27. What is meant by operator 61. What is meant by statement character as input, if it is a digit,
precedence? (/ 6) terminator? (/ 3) print a digit, otherwise print NOT a
28. What is the function of getch () 62. Explain the purpose of “/n”. (/ 3) digit. (/ 1)
function in C language? (/ 6) 63. What does the modulus 94. Write two examples of array
29. What is the difference between operator do? (/ 3) declaration. (/ 1)
assignment operator and equal 64. Write a truth table of the end 95. Write any tw o examples of
operator? (/ 6) operator (&&). (/ 3) array initialization. (/ 1)
30. What does array mean? (/ 6) 65. Draw a flowchart of an if-else 96. Write a program that displays
31. H ow m an y type s o f statement. (/ 3) numbers from one to ten on the
selection/conditional statements 66. Describe the structure of an screen. (/ 1)
are there? (/ 6) if-else-if statement. (/ 3) 97. When are two points important
32. How does the 67. What is meant by data to keep in mind while arranging
divide-and-conquer strategy help structure? (/ 3) functions in a program? (/ 1)
solve problems? Or what is meant 68. Draw a flow chart of the 98. How many values can a
by a good problem-solving structure of a for loop. (/ 3) function return? (/ 1)
strategy? (/ 6) 69. What is meant by define a 99. Which strategy divides the
33. What is meant by loop function? (/ 3) problem into smaller problems
structure? (/ 6) 70. What is meant by program? and why? (/ 1)
34. What is meant by arguments to (/ 2) 100. What value will return? (/ 1)
functions? (/ 6) 71. When and w ho made C
35. What is meant by the body of a language? (/ 2) Subjective Type (Part II)
function? (/ 6) 72. Explain the purpose of "/t".(/ 2)
36 . Wha t do you k now a bout 73. What are operators? Write the 1. What are logical operators?
logical operators? (/ 5) names of some operators. (/ 2) Explain its types. (/ 6)
37. Define computer programmer. 74. What are Arithmetic 2. What are comments? Explain
(/ 5) Operators? (/ 2) their purpose, syntax and types.(/ 5)
3 8 . Wr i te dow n th e r ul e s for 75. What Are Relational 3. Write a program to print even
naming variables. (/ 5) Operators? (/ 2) numbers 2-20 using "for" loop.(/ 4)
39. What is meant by the index of 76. Write of truth table OR 4. Write a program to print odd
an array? (/ 5) Operator. (/ 2) numbers between 1-19 using "for"
40. How many types of loops are 77. What is the function of NOT loop. (/ 4)
there? (/ 5) operator (!) in C language? (/ 2) 5. What is meant by data type of
41. What is meant by parameters 78. What is meant by language variable? Explain their types and
of functions? (/ 5) short-circuit evolution? (/ 2) give examples. (/ 3)
42. Dra w a fl ow cha rt of an if 79. Create a nested selection 6. What are format specifiers?
statement. (/ 4) structure. (/ 2) Explain their uses and give
43. When does a syntax error 80. Why is it important to write examples. (/ 3)
occur? (/ 4) multiple instructions in a block 7. What are Arithmetic Operators?
44. What is meant by constants? within an if or else statement? (/ 2) E x p l a i n a ny thr e e a ri t hm e ti c
(/ 4) 81. What is meant by condition? operators. (/ 3)
45. What is meant by I/O function? (/ 2) 8. Illustrate the use of printf ( ) and
(/ 4) 82. Explain the difference between s c a nf ( ) i n C l a ngua ge w i t h
4 6 . S ta te t he pur pos e o f the 'if' statement and "if else" examples. (/ 3)
escape sequence. (/ 4) statement. (/ 2) 9. Write a program to print a table of
47. What are assignment 83. Why do we need data any number using "for" loop. (/ 3)
operators? (/ 4) structures? (/ 2) 10. What is meant by constants?
48. What is a compound 84. When a for loop is used? (/ 2) E x pl a i n the i r type s a nd gi v e
statement? (/ 4) 85. Write a program to display examples. (/ 2)
49. How to access the elements of Pakistan three times on the 11. Write a program that takes
an array? (/ 4) screen. (/ 2) input from the user for the marks
50. What is meant by function 86. Write a program that writes a obtained for 4 subjects and
reuse? What is meant by function table of two. (/ 2) displays the marks obtained on
reusability? (/ 4) 87. Write an example of a float the screen. (/ 2)
51. What is meant by computer type declaration to return the 12. Write a program that prints the
programming? (/ 3) numbers of five students. (/ 2) factorial of any number using a for
52. What is meant by programming 88. How does language use the loop. (/ 2)
environment? (/ 3) strategy of divide and conquer? (/ 2) 13. Write a program using a for
53. What is meant by syntax? (/ 3) 89. List the parts of a function loop to print the sum of the first
54. What are header files? (/ 3) definition. (/ 2) ten natural numbers. (/ 2)

You might also like