0% found this document useful (0 votes)
19 views6 pages

One Word Cs

Uploaded by

madhandwaraa
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)
19 views6 pages

One Word Cs

Uploaded by

madhandwaraa
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/ 6

1. …………….. reduce the size and 9.

A header file can be identified by


complexity of a program, makes it their file extension ……………..
easier to understand, test, and check a) .head b) .h c) .hf
for errors. d) None of these
a) Arrays b) Functions 10. ………… is a header file contains
c) Structures d) Unions pre-defined standard input/output
2. The strcpy() function takes two functions.
arguments of ………………. a) conio.h b) istream.h c)
(a) target and source (c) base and iostream.h d) stdio.h
exponent 11. ……………. header file defines
(b) upper and lower (d) none of various operations on characters.
these a) conio.h b) ctype.h
3. Functions which are available in the c) iostream.h d) stdio.h
C++ language standard library is 12. The length of the string does not
known as ……………… functions. include the _______ character.
a) Built-in c) Either A or a) Null(\0) b) Blank space
B c) White spaced) None of these
b) User-defined d) None of 13. The Strcmp( ) function returns a
these ………………. value if the first
4. The pow() function takes the two differing character in string1 is
arguments of ………………. greater than the corresponding
(a) target and source (b) upper and character in string2.
lower a) Positive b) Negative
(c) base and exponent (d) source and c) Zerod) None of these
exponent 14. The Strcmp() function returns a
5. Why functions are needed? …………….. value if the first
a) Divide and conquer the purpose differing character in stringl is less
b) Reusability of code than the corresponding character in
c) Reduce the complexity of a string2.
program a) Positive b) Negative c) Zero
d) All the above d) None of these
6. The C++ program always has a 15. If a negative value is passed as an
main() function to begin the program argument to sqrt( ) function, a
execution. …………….. occurs,
(a) 1 (b) 2 (c) 3 (d) null a) Data type mismatch
7. Ready-to-use subprograms are called c) Prototype mismatch
……………….. b) Domain error
a) Pre-defined functions d) None of these
b) Built-in functions 16. If any argument passed to pow() is
c) Either A or B d) None of long double, the return type is
these promoted to ……………..
8. In C++ the arguments can be passed a) long double b) int c)
to a function in ………………. double d) char
ways. 17. C++ program can contain
(a) 2 (b) 1 (c) 3 (d) 7 ……………. main”() function.
a) Only one
b) No calling the function.
c) More than one a) Default b) Actual
d) None of these c) Formal d) None of these
18. In C++,……………… function 27. The default value is given in the
begins the program execution. form of …………………….
a) void b) main( ) a) Variable declaration
c) User-defined d) Built-in b) Variable initialization
19. ………………. data type is used to c) void
indicate the function does not return d) None of these
a value. 28. The default arguments facilitate the
a) int b) double function call statement with
c) void d) unsigned ………………. arguments.
20. …………… data type is used to a) Partial b) No
declare a generic pointer. c) Complete d) All the above
a) int b) double 29. The default values can be included in
c) void d) unsigned the function prototype from
21. The user-defined function should be ……………….
called explicitly using its a) Left to Right
……………… b) Right to Left
a) Name c) Center to Left
b) Arguments to be passed d) None of these
c) Both A and B 30. The constant variable can be
d) None of these declared using the……………
22. …………………. are the means to keyword.
pass values from the calling function a) constant b) Const
to the called function. c) const d) CONST
a) Arguments 31. The …………….. keyword makes
b) Parameters variable value stable. (OR)
c) Arguments or Parameters 32. The ……………… modifier enables
d) None of thesef to assign an initial value to a variable
23. The variables used in the function that cannot be changed later inside
definition as parameters are known the body of the function
as ……………. parameters. a) constant b) Const
a) Formal b) Actual c) const d) CONST
c) Ideal d) None of these 33. In C++, the arguments can be passed
24. The parameters used in the function to a function in ……………. ways.
call are known as ………………. a) three b) two
parameters. c) four d) None of these
a) Formal b) Actual 34. In C++, the arguments can be passed
c) Ideal d) None of these to a function in ………………
25. The ……………… can be used in method.
the function call as parameters. a) Call by value
a) Constants b) Variables b) Call by reference
c) Expressions d) All the above c) Either A or B
26. The …………….. arguments allow d) None of these
omitting some arguments when ………………. method copies the
value of an actual parameter into the 41. A(n) ………….. function looks like
formal parameter of the function. a normal function in the source file
a) Call by value but inserts the function’s code
b) Call by reference directly into the calling program.
c) Either A or B a) inline b) Built-in
d) None of these c) User-defined d) None of these
35. In ……………. method, changes 42. To make a function inline, one has to
made to the formal parameter within insert the keyword …………….. in
the function will have no effect on the function header.
the actual parameter. a) Inline b) Insert
a) Call by value c) INLINE d) None of these
b) Call by reference 43. ……………. functions execute faster
c) Either A or B but require more memory space.
d) None of these a) User-defined b) Built-in
36. ………… method copies the address c) Inline d) None of these
of the actual argument into the 44. The inline function reduces the
formal parameter. complexity of using
a) Call by value …………………
b) Call by reference a) Array b) Stacks
c) Either A or B c) Structures d) Unions
d) None of these 45. Returning from the function is done
37. In the…………….. method, any by using the ………… statement.
change made in the formal parameter a) return b) goto
will be reflected back in the actual c) break d) continue
parameter. 46. The …………….. statement stops
a) Call by value execution and returns to the calling
b) Call by reference function.
c) Either A or B a) return b) goto
d) None of these c) break d) continue
38. The definition of the functions is 47. Identify the true statement from the
stored in ……………. following.
a) Array a) A return may or may not have a
b) Call by reference value associated with it.
c) Structures b) If the return has a value associated
d) None of these with it, that value becomes the return
39. ………….. functions can be used to value for the calling statement.
reduce the overheads like STACKS c) The return statement is used to
for small function definition. return from a function.
a) Inline d) AN the above
b) Built-in 48. The data type of a function is treated
c) User-defined as …………….. if no data type is
d) None of these explicitly mentioned.
40. ……………. reduces the speed of a) Null b) void
program execution. c) Empty d) int
a) Array b) Stacks
c) Structures d) Unions
49. What is the return type of the hidden scope of a variable.
following function prototype? add a) ? : b) # c) : : d) &&
(int, int);
a) Null b) void 57. The size of the array is referred to
c) Empty d) int as its ………………..
(a) dimension
50. What is the return type of the
following function prototype? double (b) direction
add (int, int); (c) location
a) float b) void (d) space
c) double d) int
58. Displaying all the elements in an
51. A function that calls itself is known array is an example of ………………..
as ………….. function. (a) memory allocation
a) recursive b) nested
(b) call by reference
c) invariant d) variant
(c) traversal
52. ………………. is mandatory when a (d) none of these
function is defined after the main()
function. 59. During ……………….. the array of
a) Function prototype elements cannot be initialized
b) Function parameters more than its size.
c) Return statement
(a) declaration
d) None of these
(b) initialization
53. Scope refers to the accessibility of a (c) assigning
…………….. (d) execution
a) Function b) Class
c) Variable d) Constant 60. The …………….. of the array is
referred to as its dimension.
54. There are ………… types of scopes a) Elements b) Size
in C++.
c) Format d) None of these
a) five b) two c) three d) four

55. A …………… is a region or life of 61. A structure without a name tag is


the variable and broadly speaking called ………………..
there are three places, where (a) homogenous structure
variables can be declared. (b) anonymous structure
a) Scope (c) array of structure
b) Access specifier
(d) dynamic memory
c) Location
d) None of these
62. A one-dimensional array
56. …………….. is a scope resolution represents values that are stored
operator. (OR) operator reveals the in a single …………….
a) Row b) Column
c) Either A or B c) Expression that evaluates to an
d) None of these integer d) Either A or B or C

63. Array size should be specified 69. Accessing each element of an


with ………………… array at least once to perform any
a) square brackets[ ] operation is known as ………………..
b) Parenthesis ( ) a) Traversal
c) Curly braces{ } b) Process
d) Angle brackets < > c) Reference
d) None of these
64. he array subscript always starts
with ……………… 70. …………………. is a process of
a) 0 b) 1 finding a particular value present
c) -1 d) None of these in a given set of numbers.
a) Filtering b) Searching
65. The subscript always is a(n) c) Seeking d) None of these
………………value.
a) Integer 71. In C++, there is no basic data
b) Unsigned integer type to represent a …………….
c) Signed integer a) String
d) float b) Character
c) Literal
66. Unless an array is initialized, all d) float
the array elements contain
……………..values. 72. In two dimensional arrays,
a) Null b) Default …………….. size is optional.
c) Garbage d) None of these a) Column b) Row
c) Both A and B d) None of
67. While declaring and Initializing these
values In an array, the values
should be given within the 73. The two-dimensional array can be
…………….. viewed as a …………………
a) square brackets[ ] a) List
b) Parenthesis () b) Matrix
c) Curly braces{ } c) Linear block
d) Angle brackets < > d) None of these

68. The subscript in the bracket can 74. There are …………… types of 2-D
be a(n) ………………. array memory representations.
a) Variable b) Constant a) two b) one
c) three d) many
75. In procedural programming all 82. An identifiable entity with some
data items are ………………. characteristics and behaviour is
(a) Cobol (b) global called ……………
(c) fortran (d) class a) Instances b) Objects
c) Either A or B d) None of these
76. The object-oriented paradigm
allows us to organize software as 83. The Object-Oriented
a collection of objects that consist Programming approach mainly
of ………………….. encourage ______
a) Data b) Behaviour a) Modularisation
c) Both data and behaviour b) Software re-use
d) None of these c) Both A and B
d) None of these
77. Paradigm means ………………..
a) Organizing principle of a 84. ……………………… is the most
program striking feature of a class,
b) An approach to programming a) Polymorphism
c) Either A or B b) Encapsulation
d) None of these c) Abstraction
d) Inheritance
78. Class is a ……………… data type.
a) User-defined b) Derived 85. The encapsulation of data from
c) Primitive d) None of these direct access by the program is
called …………………….
79. …………………. can be defined as a a) Data hiding
template or blueprint b) Information hiding
representing a group of objects c) Either A or B
that share common properties d) None of these
and relationship.
a) Class 86. The attributes are called
b) Structure ……………………..
c) Array a) Data members b) Methods
d) None of these c) Member functions
d) Either B or C
80. ……………….. are the basic unit of
OOP. 87. ………………. is a good feature for
a) Attributes b) Objects data redundancy.
c) Members d) None of these a) Polymorphism
b) Modularity
81. The class variables are c) Abstraction
called…………………… d) Inheritance

You might also like