0% found this document useful (0 votes)
7 views4 pages

CSI Chap3 C++ QB

The document contains subjective and objective questions related to C++ programming, covering topics such as arrays, functions, loops, and operators. It includes explanations and examples for concepts like recursion, function overloading, and pointer variables. Additionally, it features programming exercises that require writing C++ code for various tasks.
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)
7 views4 pages

CSI Chap3 C++ QB

The document contains subjective and objective questions related to C++ programming, covering topics such as arrays, functions, loops, and operators. It includes explanations and examples for concepts like recursion, function overloading, and pointer variables. Additionally, it features programming exercises that require writing C++ code for various tasks.
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/ 4

Computer Science Paper I Chapter 3 C++ Programming

Subjective Questiions
1) How the array is initialized in C++? Explain it.
2) Explain the recursive function in C++.
3) What is array? How the elements are input in an array?
4) State the C++ statements for the following.
1) Array of 10 doubles 2) Pointer to an integer
5) What is function overloading? Explain it with example.
6) Explain the inline function with example.
7) What is array? Explain it with example.
8) Explain the inline function with example.
9) State the types of arrays. Explain it with example.
10) Explain the following terms. ------1) Pointer Variable 2) Default Arguments
11) State the difference between normal function and inline function.
12) What is recursive function in C++? State its features.

TG
13) How the array can be defined in terms of pointer? Explain it.
14) Explain the use of continue statement in C++.

S_
15) What is array? Explain the multidimensional array in that.
16) What is function? Explain the advantages of using function in the program.

_C
17) Explain the difference between pass by value and pass by reference method of calling functions.
18) Explain the difference between while and do..while loop in C++.

N
19) Explain the if….else statement in C++.

AO
20) Explain the switch …case statement in C++ with example.
21) Explain the for loop in C++ with example.
G
22) Explain the arithmetical operators used in C++.
BE

23) Explain the break statement in C++ with example.


24) State the derived data types in C++ and explain any one of them.
M

25) What is loop in C++? State the types of loops in C++.


26) Explain the bitwise operators in C++.
_A

27) Define the following.


R

1) Function Prototype. 2) Function Definition


_J

28) What is string? State the functions related to it.


29) Write a program in C++ to initialize the array of 5 float variables.
AD

30) Write a program in C++ to input and display the two dimensional array. (Consider 2 X 2 matrix)
31) Write a program in C++ to calculate the factorial of a number using recursive function
G

32) Write a program in C++ to calculate the sum of the elements of an array.
H

33) Write a program in C++ to display the array in terms of pointer.


34) Write a program in C++ to display the array in reverse order.
N

35) Write a program in C++ to input & display the elements of an array.
SI

36) Write a program in C++ to calculate the area of circle & rectangle using overloading of functions.
37) Write a program in C++ for the following output.
*
**
***
****
*****
38) Write a program in C++ to check whether the given number is odd or even.
39) Write a program in C++ to check whether the given is divisible by 9.
40) Write a program in C++ to calculate and display the sum of first 10 numbers.
41) Write a program in C++ to check whether the given number is prime or not prime.
42) Write a program in C++ to calculate the factorial of given number using function.
43) Write a program in C++ to calculate the area of the circle and display the same.
44) Write a program in C++ to display the maximum number between two numbers.
45) Write a program in C++ to calculate the product of 2 numbers using function.
46) Write a program in C++ to find the maximum number between 2 numbers.
47) Write a program in C++ to display the even numbers from 1 to 100.
48) Write a program in C++ to calculate the area of triangle and display the same.
49) Write a program in C++ to find the sum and average of 10 numbers and display the same
50) Write a program in C++ to calculate and display the cube of a number from 10 to 20.
51) Write a program in C++ to display the table of a number inputted by the user.
52) Write a declaration for each of the following.
1) A pointer to an array of 8 floats 2) A function that returns a float 3) An array of 8 pointers to float.
53) Write a program in C++ to input and display the two dimensional array.(Consider 3X4 array).
Objective Questions
1) ------------- operator is used display the contents of any variable through pointer.
a) & b) * c) ! d) %

2) Array is the group of ------------- elements in C++.


a) similar b) different c) same value d) none of these

TG
3) -------------- function is known as circular function in C++.
a) Inline b) Recursive c) Overload d) Constructor

S_
4) The character type variable in C++ requires --------- bytes.

_C
a) 1 b) 2 c) 3 d) 4

N
5) --------------- is a derived data type in C++.
a) double b)integer c) array d)float
AO
G
6) ------ is the unary operator in C++.
BE

a) + (add) b) ++ c) % d) /
M

7) The float variable requires ----------- bytes in C++.


a) 4 b) 1 c) 2 d) 16
_A

8) Array is -------------- datatype in C++.


R

a) derived b) built in c) primary d) user defined


_J
AD

9) The double variable requires ----------- bytes in C++.


a) 4 b) 1 c) 2 d) 8
G

10) How many operators are classified in C++?


H

a) 10 b)11 c)12 d)14


N
SI

11) Auto, static, extern and register are called as-------------.


a)Static b)Auto c)Storage specifier d)Register

12) Which is the smallest individual unit in a program? --------


a) Data b) Tokens c) Pointers d) Statements

13) Which of the following is not a C++ keyword? ---------


a) content b)if c)for d)new

14) Which of the following is a derived data type? ---------(Multiple options)


a) Array b) double c) string d) Union

15) Arrays are of........... types.


a) 4 b) 3 c) 2 d) 1
16)......... are otherwise called as literals.
a) Data b) Variables c) Strings d) Constants

17) Arrays in C++ belong to which of the following data type?


a)Derived b)Primitive c)User defined d)Basic

18) ----------dimensional array is an array in which each element is itself an array.


a)One b)Two c)Three d)Mutildimensional

19) Which function does insert the function's code directly into the calling programs? ---------
a) main b)void c)inline d)online

20) The scope of any variable used in the entire program is ........
a) Function b) Class c)File d)Local

TG
21) -------- are the building blocks of C++ programs.
a) for b)switch c)if-else d)functions

S_
22) The function that return no value is declared as-------------.

_C
a) void b)public c)null d)static

N
23) A function can be invoked from another function using its .........

AO
a) name b)return c)value d)variables
G
24) C++ was developed by .........
a) Thomas Kushz b) . John Kemney c) James Goling d) Bjarne Stroutstrup
BE

25) If the value of a = 4 and b = 7, then the value of p after execution of statement
M

p = - -b + a++; is -------------. 6+4=10 –a=5


_A

a) 10 b) 11 c) 9 d) 12
R

26) -------------- is not a derived data type in C++.


_J

a) Pointer b) Array c) String d) float


AD

27) float * p
G

In above declaration data type of p is --------- and data type of variable pointed
H

by p is -------------.
N

a) float, float b) float, int c) int, float d) Pointer ,float


SI

28) When a function is called by reference it can work on ------------ variables in the calling program.
a) original b) virtual c) copies of d) None of these

29) String datatype ends with-------------.


a) 0 b) \0 c) \n d) End

30) To use string function such as strcmp( ) we must include file ---------------
a) #include<string.h> b) #include<iostream.h> c) #include<fstream.h> d)
#include<iostring.h>

31) ---------- is not built in data type in C++.


a) int b) float c) char d) class
32) The do---while statement is ------------.
a) an entry control loop b) conditional statement c) an exit control loop d) None of these

33) The code written for the function is known as function -----------
a) definition b) statement c) argument d) source.

35) ------------- operator is used to store the address of variable in pointer variable.
a) & b) * c) ! d) %

36) ------------ is the collection of homogeneous elements in C++.


a) array b) integer c) double d) float

37) When a function is called by value it can work on ------------ variables in the
calling program.
a) Original b) Virtual c) Copies of d) None of these

TG
38) ------------- is used to continue the next iteration of the loop.
a) break b) continue c) goto d) None of these

S_
39) String in C++ are treated as ------------------.

_C
a) integer array b) float array c) character array d) None of these

N
40) -------------- variable is the alias for the variable to which it is assigned.

AO
a) pointer b) reference c) character d) None of theseG
41) In context with the pointers -------------- is the de-reference operator.
a) & b) * c) ! d) %
BE

42) - ------------- is the unconditional control structure in C++.


M

a) goto b) if…else c) switch-case d) None of these


_A

43) ------------operator is used to give remainder after integer division.


R

a) & b) * c) ! d) %
_J
AD

44) ------------ operator resolves the ambiguity between global and local variables.
a) - b) :: c) ! d) %
G
H

45) -------------- is the unary operator.


a) + b) / c) ++ d) %
N
SI

46) A program statement that invokes a function is called as function ----------.


a) declaration b)call c)definition d)execute.

47) The element a[7] is the which element of an array?------------.


a) sixth b)seventh c)eighth d)can’t tell

48) An array element is accessed by ---------.


a) a first in-first out approach b)the dot operator c)a member name d)an index number

49) The double type variable in C++ requires --------- bytes.


a) 1 b) 2 c) 3 d) 4

50) Which of the following is not a iterative programming structure?


a) for b) while c) do while d) switch -case

You might also like