What will be the output of the following C++ code? #include <iostream> using namespace std; class Test {
View Question
What happens if the following program is compiled in both C and C++?
#include <stdio.h>
struct STRUCT
{
int static a;
};
int main()
{
struct STRUCT s;
return 0;
}
What happens if the following program is compiled in both C and C++? #include <stdio.h> struct STRUCT {
View Question
What happens if we run the following code in both C and C++?
#include <stdio.h>
struct STRUCT
{
int a = 5;
int func()
{
printf(“%d\n”, a);
}
};
int main()
{
struct STRUCT s;
s.func();
return 0;
}
What happens if we run the following code in both C and C++? #include <stdio.h> struct STRUCT {
View Question
What happens if we run the following code in both C and C++?
#include <stdio.h>
struct STRUCT
{
int a;
int func()
{
printf(“HELLO THIS IS STRUCTURE\n”);
}
};
int main()
{
struct STRUCT s;
s.func();
return 0;
}
What happens if we run the following code in both C and C++? #include <stdio.h> struct STRUCT {
View QuestionWhich of the following is correct?
a) struct cannot have member function in C but it can in C++ b) struct cannot have member ...
View QuestionWhich of the following is correct?
a) struct tag is required in both C and C++ while declaring an object of the ...
View QuestionWhat is the size of a character type in C and C++?
a) 4 and 1 b) 1 and 4 c) 1 and 1 d) 4 and 4 Answer: c Explanation: ...
View QuestionWhat is the size of a character literal in C and C++?
a) 4 and 1 b) 1 and 4 c) 1 and 1 d) 4 and 4 Answer: a Explanation: ...
View QuestionWhich of the following is accessed by a member function of a class?
a) The object of that class b) All members of a class c) The public part of a class
View QuestionWhich of the following operator has left to right associativity?
a) Unary operator b) Logical not c) Array element access d) addressof Answer: c
View Question