What will be the output of the following C++ code?
Which C++ header file includes the definitions of cin
and cout
?
What is the output of the following C code?
printf("%-10.2e", 52.1024);
How to compile a 32-bit program on 64-bit GCC in C and C++
What is the output of the following C++ program?
int main()
{
if(0)
{
std::cout << "Hi";
}
else
{
std::cout << "Bye";
}
return 0;
}
What will happen in the following C++ code snippet?
int a = 100, b = 200;
int *p = &a, *q = &b;
p = q;
why is dynamic__cast operator used?
Which of the following libraries is used for storing very large values of integers?
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
void Sum(int a, int b, int & c)
{
a = b + c;
b = a + c;
c = a + b;
}
int main()
{
int x = 2, y =3;
Sum(x, y, y);
cout << x << " " << y;
return 0;
}
What will be the output of the following C++ code?
#include <iostream>
#include <memory>
#include <string>
using namespace std;
int main ()
{
string numbers[] = {"steve", "jobs"};
pair <string*, ptrdiff_t> result = get_temporary_buffer<string>(2);
if (result.second>0)
{
uninitialized_copy ( numbers, numbers + result.second, result.first );
for (int i = 0; i < result.second; i++)
cout << result.first[i] << " ";
return_temporary_buffer(result.first);
}
return 0;
}