Which header file is required to use the accumulate() function?
Where does the return statement returns the execution of the program?
What is the purpose of the ofstream class in C++?
What will be the value of x after executing the following program?
int i=0, x=0;
for(i=1; i<10; i++)
{
if(i%2 == 1)
x += 1;
else
x--;
}
Consider the following recursive function fun(x,y).What is the value of fun(4,3)?
int fun(int x,int y)
{
if(x==0)
return y;
return fun(x-1,x+y);
}
What will be the output of the following C code considering the size of a short int is 2 bytes, char is 1 byte, and int is 4 bytes?
What is the purpose of the flip() function in a C++ bitset?
#include <iostream>
using namespace std;
int x;
int main ()
{
int y;
cout << x << '\n';
cout << y << '\n';
return 0;
}
What is the maximum value of an unsigned 16-bit integer?
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
float i = 123.0f;
cout << i << endl;
return 0;
}