Introduction to C++
This Test will cover the basic concepts of C++, including datatype, loop, if-else condition, switch statement etc.
Q.In Object Oriented programming, abstraction refers to ?
Q. Size hierarchy for floating point numbers is : float < double < long float
?
Q. ___________ is also an operator that is used to get information about the amount of memory allocated for data types and Objects
Q. typedef is a keyword used in C language to assign alternative names to existing types ?
Q. What will be the output of following code ?
#include <iostream>
using namespace std;
int main()
{
int i=10;
if(i=20)
cout << i ;
return 0;
}
Q. What will be the output of following code ?
#include <iostream>
using namespace std;
void fun()
{
static int i = 10;
i++;
cout << i;
}
int main()
{
fun();
fun();
fun();
return 0;
}
Q. You can never use or compute address of _________ variable ?
Q. What will be the output of following code ?
#include <iostream>
using namespace std;
void calc(int x);
int main()
{
int x = 10;
calc(x);
printf("%d", x);
return 0;
}
void calc(int x)
{
x = x + 10 ;
}
Q. Default storage class for local variables is ?
Q. __________ is defined as user defined data type and it also contains functions in it ?