Sie sind auf Seite 1von 3

Pointer

1. What is pointer have the address of pointer type variable 2. What is this pointer refer to current object of the class which is calling the function of the class 3. What is memory leakage-when we not deallocate(using delete) the memory allocated by new operator 4. What is difference between dynamic and static stack- dynamic reserve memory at run time but static reserve memory at compile time 5. What is free store (heap) area - the memory from which memory is reserved at run time 6. How will you allocate memory from free store and from stack area free store (by using new operator) stack (by simply declaring a variable of any data type) 7. What is a node in linked list- self referential structure ( struct node{int n; node *next;} ) 8. How stack and queue operate (FIFO and FILO)- stack (FILO or LIFO) queue(FIFO or LILO) 9. What is circular queue where front is logically connected with rear end 10. Code to insert and delete from a stack and queue? 11. what is size of a pointer? Depend upon operating system (32 bit O.S. have 4 byte size) 12. What are operation that can you apply on pointers only addition and subtraction (not addition and substraction of two pointer) 13. Difference between constant pointer and pointer to constant. constant pointer cannot change
the address that pointer have but in pointer to constant cannot change the value pointed by pointer

14. Why pointer is called a dereference operator because indirectly point to value Basics 1. what are auto and register variable auto (local variable) register (value of variable directly store in registers(part of ALU) 2. Difference between do while and while? Do while(first do then check) while(first check then do) 3. Syntax and concept of for loop? For (initialization;condition;update); all 3 parts are optional 4. Difference between break and continue break take the control out of block in which it is written but continue take control to next iteration by skipping rest of the code 5. Difference between local and global variable local(declared in function) global (declared outside any {}) 6. What are static variable- in class static means belongs to class and not to any particular object and all object of class share the static variable of the class 7. Difference between compiler and interpreter compiler (compile code 8. What are logical, runtime and compile time error? 9. Concepts of OOPs? 10. Difference between procedural and object oriented programming language? Proc focus on function(procedure), no security of data, program have to write from scratch. Oops- focus on data , security of data , program is written in objects and later these objects linked together 11. What are directives in cpp (#include, #define) 12. Why we include header file in our program (inbuilt function and obects used in program are defined in header files)

13. Difference between angle bracket <math.h>and double quotes ( math.h ) while including the header file? <> means search the file in predefined path . means search the file in current directory 14. What are macro, symbolic constant, typedef 15. What are tokens and types of tokens? 16. What are literals. Define three types of Integer Literals? 17. Size of all data types? 18. What are modifiers? Which modifies the basic meaning of inbuilt data type 19. What are reference variable? 20. Which character encoding is used in c++? ASCII 21. What are stream object in c++? 22. String functions 23. What value with the global(0), local(garbage), static(0) and class variable(depend upon static or non static) are initialized by default? 24. Difference between reference operator(&) and address operator(&); reference operator means two identifier refer to same memory location. Address operator for getting the address of variable 25. Will this code compile void main(){int a=10;int b=a;} yes 26. What are lvalue and rvalue? Lvalue (always point to some memory location) rvalue (point to some constant value that is assigned to lvalue) 27. Get(),gets(),getchar(),getch(),getche() . difference and header file Get() -iostream.h return the int value of a character (getting character from the stream) Gets() stdio.h for reading string including space Getchar() stdio.h get character from the stream Getch()- conio.h return int value of character without display on the screen Getche()- conio.h - return int value of character by displaying on the screen

Operators 1. What are binary, unary and ternary operator ? 2. Precedence and associativity of operators? Scope dot unary-arithmetic relational-logicalconditional-assignment -comma 3. What is component selection operator? (dot and arrow) 4. Memory allocation and deallocation operator (new and delete) Classes 1. 2. 3. 4. 5. What is the difference between access specifier and visibility mode? Different between private and protected? What do you understand by friend keyword? Friend member can use all member of class What is the importance of scope resolution operator in reference to class Different between structure and class?

6. Which concept of oops is defined by class? (encapsulation) 7. Is it right to write a code like class student; if yes then what is the use of this. 8. Constructor and destructor and their order of execution(also when class is inherited or any object is declared with in the class as member)

Functions 1. What are inline function? code of the inline function is placed at the point of calling at compile time 2. What are recursive function?(self calling function) 3. Difference between actual and formal arguments or parameters?(actual calling time, formal define time) 4. Difference between call by value and call by reference? 5. What do you mean by prototype of function? //function declaration 6. What is function overloading. Which concept of oops is defined by function overloading? (polymorphism) 7. Difference between function overloading and function overriding? 8. What is the difference between declaration and definition of function ? 9. Difference between inbuilt and user defined function? 10. Which is the situation when function call can become ambiguous while function is overloaded? 11. What do you understand by data type promotion in calling a overloaded function? 12. What is the difference between call by reference and call by pointer? 13. Can we return a local variable by reference if not then why? (no) 14. Int f(int a) const; accessor function in class or can not modify a in f() Files About all the files mode. Difference between text file and binary file Why we write (char *) &ob in write and read function. What is difference between get(line,100, \n ) and getline(line, 100, \n ) {get() do not remove \n from stream but getline does) 5. What is differnce between seekg() and tellg() fun, eof() 6. Difference between app and ate mode? 7. What is file cursor. Where is the file cursor position when file opened with ate mode 1. 2. 3. 4.

Das könnte Ihnen auch gefallen