What will be the output of the following C++ code? #include <iostream> ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int i;
const char *arr[] = {“C”, “C++”, “Java”, “VBA”};
const char *(*ptr)[4] = &arr;
cout << ++(*ptr)[2];
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24};
cout << *(a[1] + 2) << *(*(a + 1) + 2) << 2[1[a]];
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View QuestionWhat is size of generic pointer in C++ (in 32-bit platform)?
a) 2 b) 4 c) 8 d) 0 Answer: b Explanation: Size of any type of pointer ...
View Question
What is the meaning of the following declaration?
int(*p[5])();
What is the meaning of the following declaration? int(*p[5])(); a) p is pointer to function b) p is ...
View Question
What will be the output of the following C++ code?
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int array[] = {10, 20, 30};
cout << -2[array];
return 0;
}
What will be the output of the following C++ code? #include <stdio.h> ...
View Question
What will be the output of the following C++ code?
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int array[] = {10, 20, 30};
cout << -2[array];
return 0;
}
What will be the output of the following C++ code? #include <stdio.h> ...
View Question
What will be the output of the following C++ code?
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
char str[5] = “ABC”;
cout << str[3];
cout << str;
return 0;
}
What will be the output of the following C++ code? #include <stdio.h> ...
View Question
What will be the output of the following C++ code?
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int a = 5, b = 10, c = 15;
int arr[3] = {&a, &b, &c};
cout << *arr[*arr[1] – 8];
return 0;
}
What will be the output of the following C++ code? #include <stdio.h> ...
View Question
What will be the output of the following C++ code?
#include <stdio.h>
#include <iostream>
using namespace std;
int main ()
{
int array[] = {0, 2, 4, 6, 7, 5, 3};
int n, result = 0;
for (n = 0; n < 8; n++)
{
result += array[n];
}
cout << result;
return 0;
}
What will be the output of the following C++ code? #include <stdio.h> ...
View Question