Smartindia Classroom
CONTENTS
Chemistry
English
Mathematics
Physics
Computer Science(NCERT)
Back to home
Start Practice
Question-1
What is the syntax to allocate memory for a one dimensional array?
(A)
Type variable[]=new data Type[size]
(B)
Type pointer_variable[]=new data Type[size]
(C)
Type variable=new data Type[size]
(D)
Type pointer_variable[]=new data Type[size]
Question-2
Which of the following is a way to implement call by reference?
(A)
Passing parameters
(B)
Passing variables
(C)
Passing pointers
(D)
Passing function calls
Question-3
Which method is used to allocate memory at compilation time?
(A)
Static memory allocation
(B)
Dynamic memory allocation
(C)
Run time memory allocation
(D)
None of these
Question-4
Which of the following can be performed on pointers?
(A)
%
(B)
&
(C)
*
(D)
+
Question-5
Which of the following operator returns a pointer to its starting point?
(A)
delete
(B)
new
(C)
clear
(D)
Scope resolution
Question-6
What is done by delete operator?
(A)
Deletes unused memory
(B)
Returns unused memory address to function
(C)
Release memory for reuse
(D)
Rename memory address
Question-7
Which operator is used for dynamic memory allocation?
(A)
Scope resolution operator
(B)
Relational
(C)
New
(D)
&&
Question-8
What is the use of stack memory region?
(A)
To store variables of the program
(B)
For dynamic allocation
(C)
Stores return address of function calls
(D)
Stores compiled code
Question-9
What will be the result if an float pointer variable t is used in the following way. Int a; t=&a;?
(A)
address of a will be stored in t
(B)
address of a will be casted to float value
(C)
the address of a will be lost
(D)
error
Question-10
Which of the following is the correct pointer declaration?
(A)
Pointer *p;
(B)
P*;
(C)
*p;
(D)
Int *p;
Your Score 0/10
Click
here
to see your answersheet and detailed track records.
Plus 2 Computer Science
CBSE
Practice in Related Chapters
Object Oriented Programming in C++
Data Structure
Pointers
Constructor and Destructor
Classes and Objects
Database Concepts
Communication and Open Source Concepts
Databases Management System and SQL
Boolean Algebra
Data Structures (Arrays, Stack and Queue)
Class and Object
Powered By