HOME
Most Popular
New Books

C++ Basic Set 1

Pages: 0 1 Next>>
  • 0. What is Operator, Operand, Expression, Statement in 'C'?


  • 1. What is polymorphism?


  • 2. What is operator overloading?


  • 3. What are templates?


  • 4. Declare a void pointer.


  • 5. Declare a function pointer which takes a pointer to char as an argument and returns a void pointer.


  • 6. Type-define a function pointer which takes a int and float as parameter and returns a float *.


  • 7. What does the following C statement do?
    while(*c++ = *d++);
    assuming c and d are pointers to characters.


  • 8. How do you call a C module within a C++ module.


  • 9. What is the difference between run time binding and compile time binding? Discuss.


  • 10. Compare and contrast C++ and Java.


  • 11. Why does C/C++ give better run-time performance then Java?


  • 12. Does C++ come with in-built threading support.


  • 13. Class A derives B derives C. All have foo(). I cast C to A and call foo(). What happens?


  • 14. All classes A, B, C have default constructor, foo() that calls parent foo() and allocates 100 bytes to their own private local variable, and a destructor that frees the 100 bytes. I create a C object and then destroy it. What's the problem? Did all the memory get freed? What if I create C, cast to A, and then destroy it. How would I make sure memory is freed? (destructor must be virtual" and each destructor must call parent destructor)"


  • 15. What errors are caught at compile time vs link time?


  • 16. What is the value of "a" after this?
    int (*a) [10];
    a++;


  • 17. What is wrong with this?
    main(){
    int *ptr;
    *ptr=10;
    }


  • 18. Given int n, i=10, j=20, x=3, y = 100;
    What is the value of n and y at the end of each of the following expressions?
    a) n = (i > j) && (x < ++y);
    b) n = (j - i) && (x < y++);
    c) n = (i < j) || (y+=i);


  • 19. int x = 5;
    int y = 7;
    What is the value of x and y after the expression y+=x++;


Pages: 0 1 Next>>

NEW!!!

TOOOO Many results in general search?!! Try this customized search engine for searching online books