What is the size of a boolean variable in C++?
What will be the output of the following C++ code?
What will be the output of the following C++ code?
Which of the following feature is not provided by C?
What is used to allocate and deallocate storage for objects during the execution of a program?
What is the value of the following C code?
#include <stdio.h>
int main()
{
static int x;
printf("x is %d", x);
return 0;
}
What happens when a null pointer is converted to a boolean value?
What is the output of the following C code?
int fun(char *str1)
{
char *str2 = str1;
while(*++str1);
return (str1 - str2);
}
int main()
{
char *str = "Abekus";
printf("%d", fun(str));
return 0;
}
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
char arr[20];
int i;
for(i = 0; i < 10; i++)
*(arr + i) = 65 + i;
*(arr + i) = '\0';
cout << arr;
return(0);
}
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
long factorial (long a)
{
if (a > 1)
return (a * factorial (a + 1));
else
return (1);
}
int main ()
{
long num = 3;
cout << num << "! = " << factorial ( num );
return 0;
}