adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    int func (int a, int b)
    {
        cout << a;
        cout << b;
        return 0;
    }
    int main(void)
    {
        int(*ptr)(char, int);
        ptr = func;
        func(2, 3);
        ptr(2, 3);
        return 0;
    }

a.

2323

b.

232

c.

23

d.

compile time error

Answer: (d).compile time error

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?

Similar Questions

Discover Related MCQs

Q. What are the mandatory part to present in function pointers?

Q. which of the following can be passed in function pointers?

Q. What is meaning of following declaration?
int(*ptr[5])();

Q. Which keyword is used to define the macros in c++?

Q. Which symbol is used to declare the preprocessor directives?

Q. How many types of macros are there in c++?

Q. What is the mandatory preprosessor directive for c++?

Q. What is the other name of the macro?

Q. Which of the following is used to implement the c++ interfaces?

Q. What is the ability to group some lines of code that can be included

Q. How many types does functions fall depends on modularization?

Q. How many types of modularization are there in c++?

Q. What does the client module import?

Q. Identify the correct statement.

Q. What is similar to interface in c++

Q. Which of the following implements the module in the program?

Q. A C++ program contains a function with the header int function(double d, char c). Which of the following function headers could be used within the same program?

Q. A function that returns no values to the program that calls it is _____

Q. Which of the following statements is false?

Q. The generic type in a template function