0% found this document useful (0 votes)
27 views5 pages

X Computer Assignment ch 11-15

The document contains a series of multiple-choice questions related to computer programming concepts, specifically focusing on the C programming language. It covers topics such as data types, functions, decision structures, loops, and arrays. Each chapter includes a set of questions designed for students in standard X to assess their understanding of the subject matter.

Uploaded by

meetchaudhary486
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)
27 views5 pages

X Computer Assignment ch 11-15

The document contains a series of multiple-choice questions related to computer programming concepts, specifically focusing on the C programming language. It covers topics such as data types, functions, decision structures, loops, and arrays. Each chapter includes a set of questions designed for students in standard X to assess their understanding of the subject matter.

Uploaded by

meetchaudhary486
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
You are on page 1/ 5

THE

HEBRON SECONDARY SCHOOL


MANINAGAR (EAST), AHMEDABAD – 380008
ASSIGNMENT CH-11 TO 15
SUBJECT: COMPUTER
STD: X

Chapter 11

1. Which of the following keywords refer to integer data type?


(A) integer (B) Integer (C) INTEGER (D) int
2. Which of the following refers to an empty value?
(A) void (B) Void (C) char (D) float
3. Which of the following refers to size of memory allocated to float as per gcc compiler?
(A) 1 (B) 2 (C) 4 (D) 6
4. Which of the following is a valid keyword in C that identifies valid character value?
(A) char (B) character (C) CHAR (D) CHARACTER
5. Which of the following is a user define data type in C?
(A) int (B) enum (C) char (D) float
6. Which of the following is used to provide an alias to existing data types in C?
(A) enum (B) def (C) pointer (D)typedef
7. The symbol & belong to which of the following operator types in C?
(A) Relational (B) Arithmetic (C) Logical (D) Bitwise
8. The symbol ! belong to which of the following operator types in C?
(A) Relational (B) Arithmetic (C) Logical (D) Bitwise
9. The = symbol is used for which of the following operations in C?
(A) Equality check (B) Assignment (C) Comment (D) Formula
10. Which of the following refer to the meaning of value++ in C?
(A) Post increment (B) Post decrement (C) Pre increment (D) Pre decrement
11. Each data type is allocated a fixed memory space in C and is denoted be …………. .
(A) constant (B) byte (C) variable (D) data type
12. The variable defined using int are …….. .
(A) signed (B) unsigned (C) positive (D) none of the given
13. unsigned int data types occupies …… bytes in memory space.
(A) 16 (B) 8 (C) 4 (D) 1
14. Float data types are precise to …… decimal digits, i.e., after the ‘.’ .
(A) 6 (B) 5 (C) 4 (D) 7
15. Keyword char occupies ……. Byte of memory space.
(A) 4 (B) 2 (C) 1 (D) 3
16. …… data type is used as prefix to function name.
(A) void (B) int (C) float (D) char
17. In C, …… is used to override the internal conversion of data types.
(A) [ ] (B) + (C) type casting (D) ( )
18. Which of the following storage class variable is / are assigned with garbage value by default ?
(A) auto (B) register (C) both A and B (D) static
Chapter 12

19. It is not necessary to include stdio.h file while using ….. function.
(A) printf( ) (B) getchar( ) (C) putchar( ) (D) scanf( )
20. ……. function is used when the user don’t want to show a character typed in by him on the
screen.
(A) getc( ) (B) gets( ) (C) getch( ) (D) getchar( )
21. In scanf( ) statement, the general format of control string is …….. .
(A) /lp (B) +lp (C) %lp (D) -lp
22. ……… format specifier in scanf( ) reads a short integer.
(A) %h (B) %u (C) %g (D) %1d
23. What will be the value of variable a, b and c if ‘a’ 75.5 21 is given is given as input for
Scanf(“%c %d %d”, &a, &b, &c); ?
(A) ‘a’ 75.5 (B) ‘a’ 21 (C) ‘a’ 75 5 (D) ‘a’ 75 21
24. Which of the following is not a function for output ?
(A) puts( ) (B) putchar( ) (C) printf( ) (D) scanf( )
25. …… format specifier in printf( ) is used to print integer in hexadecimal form.
(A) %f (B) %o (C) %x (D) %ld
26. %e format specifier of printf ( ) is used to print ……… .
(A) integer in hexadecimal form
(B) a floating point value in exponent form
(C) a floating point value without exponent
(D) integer in octal form
27. Which of the following input is valid for scanf(“%[a-z A-Z]”, student_name); ?
(A) Vani M shah (B) Vani M. Shah
(C) Vani M Shah/ Vani Mahesh Shah (D) All of the given
28. String can be left justified using ……. sign in printf( ).
(A) left (B) right (C) center (D) none of the given
29. puts( ) function do not display …….. on screen.
(A) string (B) character (C) null character (D) all of the given
30. The scanf( ) stands for……… .
(A) scan file (B) scan formatted
(C) scanning & formatting (D) none of the given
31. When ……. function is executed, character will be displayed on the monitor.
(A) putchar( ) (B) puts( ) (C) gets( ) (D) getchar( )
32. Which of the following are inbuild functions ?
(A) scanf ( ), printf( ) (B) getchar( ), gets( ), getch( )
(C) puts( ), putchar( ) (D) all of the given
33. %Lf format specifier of printf( ) is used to print ………… .
(A) long double (B) long integer
(C) short integer (D) a floating point value in exponent form
34. …..format specifier in scanf( ) represents unsigned integer.
(A) %d (B) %ld (C) %u (D) %h
35. %s format specifier in scanf( ) reads a ………….. .
(A) character (B) string (C) short integer (D) long integer
36. Each string in C ends with ………… .
(A) . (B) \0 (C) \t (D) \n
Chapter 13

37. Which of the following is the simplest form of decision structure statement ?
(A) if (B) if….else (C) Nested….if (D) else….if ladder
38. if statement is considered to be ……statement when the test expression part of if ends with a
semicolon.
(A) dull (B) null (C) extra (D) conditional
39. …… is used to perform some process when test expression is evaluated to true and some other
processes if test expression is evaluated to false.
(A) if…..else (B) Nested…if (C) if (D) else….if ladder
40. There is no need to use braces around the statement block of ……..statement .
(A) switch (B) if (C) if…..else (D) Nested…..if
41. When no case is found during execution of switch statement the …… statement block is
executed.
(A) break (B) default (C) continue (D) none of the given
42. At which of the following places can the default statement be places in switch ?
(A) In the beginning of switch (B) Anywhere in the switch
(C) In the end of switch (D) None of the given
43. What can be ‘first’ in the statement switch(first) ?
(A) Constant (B) variable (C) Expression (D) All of the given
44. When chain of if statements are used together to evaluate multiple decisions, it becomes
…….. statement .
(A) if…..else (B) Nested…..if (C) else….if ladder (D) none of the given
45. …… structure is used to display the message “Student passes” if the marks of student is greater
than 40 otherwise the message “Student failed” .
(A) simple if (B) else……if ladder (C) if….else (D) switch
46. The …… statement is used to terminate the case statement block.
(A)exit (B) break (C) loop (D) stop
47. The switch statement needs only …… argument.
(A) 1 (B) 2 (C) 5 (D) 257
48. Switch is used inplace of……… .
(A) if (B) if….else (C) else….if ladder (D) Nested…..if
49. The test expression of else….if ladder is evaluated from the …….. in the ladder.
(A) top to bottom (B) bottom to top (C) left to right (D) right to left
50. C programming language assumes …… values as false.
(A) non-zero (B) zero (C) null (D) both B & C
51. Which of the following cannot be used as test expression with if ?
(A) n > 5 (B) n < 5 (C) n=5 (D) n==5
52. C language provides …….. basic types of decision structure statement ?
(A) 2 (B) 3 (C) 4 (D) 5
53. Test expression of if statement contains ……., the result of the same may be true or false.
(A) logical operator (B) relational operator (C) logical expression (D) bitwise operator
54. It is necessary to write compound statements of if in ……… .
(A) ( ) (B) [ ] (C) < > (D){ }
55. In simple if statement, there is …….. statement block.
(A) only one (B) two (C) multiple (D) none of the given
56. C language provides multiway decision statement called …. to simplify program.
(A) if (B) if…..else (C) Nested…..if (D) switch
Chapter 14

57. In looping, the sequence of statements are executed until some …… condition is satisfied.
(A) exit (B) entry (C) if (D) switch
58. …….. is / are exit controlled loop.
(A) for (B) while (C) do….while (D) Both B & C
59. …… in for loop is also known as control variable.
(A) Expression 3 (B) Expression 1 (C) Statement block (D) Expression 2
60. …… in for loop works for initializing value of counter variable.
(A) Expression 1 (B) Expression 2 (C) Expression 3 (D) All of these
61. …… in for loop, is used for checking loop terminating criteria .
(A) Expression 2 (B) Expression 1 (C) Statement block (D) Expression 3
62. All the expressions of for loop are …….. .
(A) compulsory (B) optional (C) conditional (D) operator
63. Which of the following loop is used when number of iterations are not pre-determined ?
(A) while (B) do……while (C) Both A & B (D) for
64. The compound statement of any loop should be written with in …….. .
(A) ( ) (B) { } (C) [ ] (D) ({ })
65. The …… statement terminates the loop.
(A) break (B) continue (C) default (D) Exit
66. In …. Loop, continue statement transfer the control to the test expression used with while
statement .
(A) for (B) while (C) do….while (D) both B & C
67. C program runs forever when …….. construct is used.
(A) for (; ;) (B) for (;) (C) for (; ; ;) (D) for (;);
68. Which of the following is not a loop construct in C ?
(A) for (B) while (C) do…..while (D) from
69. C language provides ….. types of loop control structures .
(A) 4 (B) 3 (C) 1 (D) 2
70. The for loop contains expressions in ………. .
(A) ( ) (B) { } (C) [ ] (D) {( )}
71. In …… loop, the test expression is checked after executing body of loop.
(A) for (B) while (C) do…..while (D) both B & C
72. Any loop in a program becomes ….. loop if it runs forever and program control never
comes out of it.
(A) entry (B) exit (C) infinite (D) incoming
Chapter 15

73. An array element occupies …… memory locations.


(A) contiguous (B) separate (C) small (D) constant
74. The subscript of an array must be …….. .
(A) an integer (B) an integer expression (C) A or B (D) real number
75. Which of the following array has one or more rows and one or more columns ?
(A) Single dimensional array (B) Multidimensional array
(C) Multipurpose array (D) None of the given
76. The initial values of an array are separated using ………. sign .
(A) , (B) - (C) : (D) ;
77. In C language, ……. array is used to represent string.
(A) integer (B) character (C) string (D) float
78. …….. is the first element of an array x[10] .
(A) x[1] (B) x[0] (C) x[-1] (D) A[0]
79. The …… array have row index as well as column index.
(A) Three dimensional (B) N-dimensional
(C) two dimensional (D) one dimensional

80. An array element is stored in ………. .


(A) CPU (B) CD (C) memory (D) screen
81. Which of the following is invalid index value for an array int number[5]; ?
(A) number[-1] (B) number[6] (C) both A and B (D) number[4]
82. ………. of the following is two dimensional array.
(A) int a[3] [3] (B) int a[2] [2] = {{0, 0}, {1, 1}};
(C) int a[4] [4] (D) int a[5][4];
83. Single dimensional and multidimensional are types of …… in C .
(A) an array (B) loop (C) condition (D) both B & C
84. It is …… to specify the size of an array.
(A) compulsory (B) optional
(C) programmer’s responsibility (D) none of the given
85. In C language, the multidimensional arrays are …….. major.
(A) rows (B) columns (C) both A & B (D) none of these
86. Strings in a C language are terminated by the special character called null character……. .
(A) \n (B) \0 (C) \t (D) \b
87. C language allows array initialization in …….. ways .
(A) 1 (B) 3 (C) 2 (D) 4
88. When an array is assigned values at the time of execution of program, it is known as……….
array initialization.
(A) run time (B) compile time (C) declaration time (D) none of these
89. In how many categories can array be classified .
(A) 2 (B) 3 (C) 4 (D) 5
90. The subscript of an array starts with ……… .
(A) -1 (B) 0 (C) 1 (D) 100

You might also like