int a=10;
float b=20;
cout<<sizeof(a+b);
what will be the output
What is this operator called ?:
How to declare a vector of size n and initialize it as 0
Which of the following operator(s) can be used with pointers?
i) – only
ii) +, *
iii) +, –
iv) +, -, *
v) /
vi) + only
What will be the output of the following C code?
#include
enum abekus
{
a,b,c=5
};
enum abekus s;
main()
{
c++;
printf("%d",c);
}
#include <stdio.h>
int fun(char *str1)
{
char *str2 = str1;
while(*++str1);
return (str1-str2);
}
int main()
{
char *str = "Abekus";
printf("%d", fun(str));
return 0;
}
What is the expected output of the following program?
main()
{
int a, b = 0;
static int c[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
for (a = 0; a < 10; ++a)
if ((c[a] % 2) == 0) b += c[a];
cout << b;
}
Pick the right option.
Statement 1: Global values are not initialized by the stream.
Statement 2: Local values are implicitly initialised to 0.
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int g = 100;
int main()
{
int a;
{
int b;
b = 20;
a = 35;
g = 65;
cout << b << a << g;
}
a = 50;
cout << a << g;
return 0;
}
What is the difference between delete and delete[] in C++?