What will be the output of following code ?
int x = 10;
int main()
{
int x = 20;
cout<< x+::x;
cout<<x+x;
return 0;
}
Name mangling implements which of the following OOP concept ?
Which of the following data member will be accessible by object of following class ?
Class X
{
private :
int a;
int b;
protected :
void init()
{
cout<<"Hello ";
}
int p;
public:
int q;
};
Which of the following files contain srand function ?
what will be output of following program ?
int main()
{
float p =1.25;
int q=5;
cout<<p/q;
}
Which of following is correct ?
In the given program which of the line will give run time error /
int main()
{
01 char *ptr = NULL;
02 gets(ptr);
03 char arr[] = "Hello";
04 cout<<arr;
05 cout<<ptr;
return 0;
}
What will be output of following program ?
void f()
{
static int j =10;
printf("%d",j);
j++;
}
int main()
{
int i;
for(i=0;i<5;i++)
f();
return 0;
}
Which of following ios flag passed in open function of fstream will open a file if it is new file othewise open operation will fail ?
What will be the output of following code ?
int main()
{
int x = 100;
cout<<oct<<x;
return 0;
}