What is the data type of the "argv" variable?
What do input/output objects support?
What type of iterators do maps and sets support?
How to define user-defined exceptions?
What is the output of the following C code?
void main()
{
char arr[] = "\0";
if (printf("%s", arr))
printf("Nothing");
else
printf("Something");
}
Identify the incorrect statement.
#include "stdio.h"
int main()
{
int i = 1, j;
for ( ; ; )
{
if (i)
j = --i;
if (j < 10)
printf("Abekus", j++);
else
break;
}
return 0;
What is an endless loop?
Which of the following two compilation units compile?
// Compilation Unit A
const int n = 42;
int x[n];
// Compilation Unit B
const int m = 42;
void foo(void) {
int y[m];
}
What will be the output of the following C++ code?
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string str="Steve Jobs founded the apple";
string str2 = str.substr (6, 4);
unsigned pos = str.find("the");
string str3 = str.substr (pos);
cout << str2 << ' ' << str3 << '\n';
return 0;
}