Questions and Answers
- What is the syntax of user-defined data types?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
typedef_existing data type_new name
- How many types of user-defined data type are in c++?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
There are three types of user-defined data types. They are typedef, union, enumerator.
- What is the scope of typedef defined data types?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
We are defining the user-defined data type to be availed only inside that program, if we want to use anywhere means we have to define those types in the header file.
- How many types of models are available to create the user-defined data type?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
There are two types of models. They are references to built-in types and multipart types.
- What is the output of this program?
#include <iostream>
using namespace std;
int StaticFunction(int)
{
int sum = 0;
sum = sum + 12;
return sum;
}
int main(void)
{
int num = 5, Res;
Res = StaticFunction(Res);
cout << Res << endl;
return 0;
}
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
Even Though we passed the value, we didn’t caught to manipulate it, So it is printing as 12.