Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

CHAPTER - 1

1. In C++ _____ operator is used for dynamic allocation


2. Read the following C++ statements :
int *p, a=5; p = &a;
i) what is the specialty of the variable p?
ii) what will be content of p after the execution of the statement?
3. Briefly explain any three concept of OOP.
4. As subscript for array, ____ is associated with structure
5. Consider the C++ statements :
int *p, a=5; p = &a; cout<< *p + a; what is the output?
6. Differentiate following C++ statements:
int *ptr = new nt(5); int *ptr = new int[5];
7. Explain the use of new and delete operator.
8. Write any two advantages of character pointer.
9. Define a structure employee with the following details. Empcode, empname, basic,
DA. Write statements to read the above details.
10. Compare array and structure.
11. Explain memory leak and any 2 reasons for memory leak
12. What is meant by self referential structure. Write an example.
13. A) Identify the errors in the following structure definition and write the reasons for it:
struct
{ int roll, age; float fee = 100; };
B) Read the following C++ statements given below:
int ar[ ] = { 34, 12, 25, 56, 38 }; int *p = ar;
i) what will be the output of p?
ii) what will be the output of the expression *p + ( *ar + 2)?
iii) The statement ar++; is invalid why?
14. In C++, define a structure named student with rollno, name and marks as members.
State the advantages of using structures over arrays.
15. In C++, define a structure named student with rollno, name and marks as members.
State the advantages of using structures over arrays.
16. Which keyword is used to define a structure in C++?
17. What is the use of structure data type in C++ programs
18. Explain the reason for memory leak in programming.
19. If int num = 5; write C++ statements to declare a pointer variable and store the
address of num into it.
20. Compare two types of memory allocation in C++
21. In C++ ____ Operator is used to get the address of a memory locationwrite any 2
features of dynamic memory allocation
22. Differentiate between array and structure.
23. What is a pointer variable in C++? Write the syntax or example to declare a pointer
variable.
24. Write any differences in static and dynamic allocation.
25. Write any 2 advantages of object oriented programming language.
26. Structure within a structure is termed as _____
27. State any 2 differences between static and dynamic memory allocation.
28. Distinguish between array and structure.
29. What is memory leak? How can it be avoided?
30. Which among the following C++ statements is invalid if p is a pointer variable? A)
cout<<*p; B) p++; C) p = new int(5); D) p = 100;
31. Identify the error in the following structure definition statement in C++ and write the
reason for the error:
struct distance
{ int cm; int m=1; }d1,d2;
32. Consider the following C++ statement : int *p;
write C++ statements to:
a) Create an integer variable dynamically.
b) assign the value 99 to it.
c) deleted the created integer variable.
33. The keyword used to define structure data type in C++ is ____.
34. Which of the following operator is used for dynamic memory allocation?
a) (*) b) (&) c) new d) delete
35. What is meant by self referential structure?
36. How does static memory allocation differ from dynamic memory allocation? what is
memory leak?
37. Elements inside a structure are accessed by ____ operator.
38. Write any 2 differences between array and structure.
39. Keyword used to create a structure is ___
40. Write the syntax to declare a pointer variable.
41. What is dynamic array? Write the syntax.
42. What are the 2 methods of memory allocation in C++ write the operators with its use.
43. In C++ ____ operator is used to get the address of a variable.
44. _____ is a prototype / blue print that defines the specifications common to all objects
of a particular type.
45. What is use of new and delete operator.
46. What is memory leak?
47. Choose the operator or value at operator used in C++ from the options given below:
a) ++ b) * c) & d) +
48. Write the syntax for the following : a) Declaration of pointer variable in C++ b)
dynamic memory allocation in C++.
49. Define the term self referential structure. Give example.
50. How will you free the allocated memory in C++ ? Discuss any 2 reasons for memory
leak.
51. Compare arrays and structure.
CHAPTER - 2

1. A blueprint for an object in OOP is called ____


2. What is the difference between runtime polymorphism and compile time
polymorphism. What do you mean by overflow and underflow in data structures?
3. List the different forms of inheritance.
4. Which type of inheritance has one base class and two or more sub-class?
5. Write any 2 features of object oriented programming.
6. What is polymorphism in OOP? What are the 2 classifications of it?
7. Write short note about polymorphism
8. In inheritance the existing class is called _____
9. The _____ operator is used to allocate memory location during the run time.
10. Write any 3 differences of procedure oriented programming and object oriented
programming.
11. What is polymorphism ? what are the different types of polymorphism?
12. Identify the type of inheritance that has 2 base classes and one derived class: a)
multilevel b) multiple c) hierarchical d) hybrid
13. What is polymorphism in Object Oriented Programming? Name the 2 types of
polymorphism
14. How do the access of labels of class data type implement data hiding?
15. Object of a class is called ____
16. What is polymorphism? What are the 2 types of polymorphism?
17. What is programming paradigm? Write the names of any 2 types of programming
paradigms.
18. Mention any 2 advantages of object Oriented Programming (OOP)
19. Briefly explain about polymorphism.
20. A structure definition for date is given below. Fill in the blanks :
____ date
{ ___ day; int month; int ____; };
21. ___ is the keyword to define a structure.
22. Which operator is used to get the address of a variable in C++ ?
23. What is nested structure ?
24. Write any 2 advantages of OOP.
25. Define the following OOP term:
a) Data Abstraction b) Inheritance c) Function overloading

You might also like