logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What are the mandatory part to present in function pointers?


  • Options
  • A. &
  • B. retrun values
  • C. data types
  • D. none of these

  • Correct Answer
  • data types 

    Explanation

    The data types are mandatory for declaring the variables in the function pointers.


  • Technology problems


    Search Results


    • 1. What is the output of this program? #include using namespace std; struct sec { int a; char b; }; int main() { struct sec s ={25,50}; struct sec *ps =(struct sec *)&s; cout << ps->a << ps->b; return 0; }

    • Options
    • A. 252
    • B. 253
    • C. 254
    • D. 262
    • Discuss
    • 2. What is friend function?
    • Discuss
    • 3. How variable declaration in c++ differs that in c?
    • Discuss
    • 4. Where is the reference stored?

    • Options
    • A. stack
    • B. heap
    • C. queue
    • D. None
    • Discuss
    • 5. Default constructor accepts how many arguments?

    • Options
    • A. one
    • B. two
    • C. three
    • D. None
    • Discuss
    • 6. What is the output of this program ? #include using namespace std; int n(char, int); int (*p) (char, int) = n; int main() { (*p)('d', 9); p(10, 9); return 0; } int n(char c, int i) { cout << c << i; return 0; }

    • Options
    • A. d99
    • B. d9d9
    • C. d9
    • D. compile time error
    • Discuss
    • 7. which keyword is used to define the macros in c++?

    • Options
    • A. macro
    • B. define
    • C. #define
    • D. none of these
    • Discuss
    • 8. How many types of macros are there in c++?

    • Options
    • A. 1
    • B. 2
    • C. 3
    • D. 4
    • Discuss
    • 9. What is the use of Namespace?

    • Options
    • A. To encapsulate the data
    • B. To structure a program into logical units.
    • C. Both a and b
    • D. none of these
    • Discuss
    • 10. What is the general syntax for accessing the namespace variable?

    • Options
    • A. namespaceid::operator
    • B. namespace,operator
    • C. namespace#operator
    • D. none of the mentioned
    • Discuss


    Comments

    There are no comments.

Enter a new Comment