Which operator is used to access the first or second element of a pair?
Which of the following is not a storage class in C language
In what format are HTML documents stored in memory?
What is the output of the following code?
#include<stdio.h>
void main()
{
int i = 10;
while(i++ <= 10)
{
i++;
}
printf("%d",i);
}
When is the size of the array not required to be specified?
Find the error in the following program.
1. int main()
2. {
3. void *a;
4. int b=5,c=6;
5. a=&b;
6. printf("%d",*(int *)a+c);
7. }
Is the following statement True or False?
The following two function declarations can be used interchangeably, i.e., they mean exactly the same:
int foo();
int foo(void);
What is the output of the program?
int main()
{
int dim[2][2] = {1, 2, 3, 4};
for(int i=0; i<2; i++)
cout << dim[i][0] << " " << dim[i][1] << endl;
}
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int f(int &x, int c)
{
c = c - 1;
if (c == 0) return 1;
x = x + 1;
return f(x, c) * x;
}
int main(int argc, char const *argv[])
{
int a = 4;
cout<<f(a,a);
return 0;
}
What will be the output of the following C++ code?
#include
using namespace std;
class Base
{
public:
virtual void show() { cout<<" In Base \n"; }
};
class Derived: public Base
{
public:
void show() { cout<<"In Derived \n"; }
};
int main(void)
{
Base *bp = new Derived;
bp->Base::show();
return 0;
}