How do you represent the constant 3.14 as a long double?
Given the following code:
int a = 2, b = 3, x = 0;
x = (++a, b += a);
What is the final value of x?
Which operator is used to define a member function of a class from outside the class definition?
#include <bits/stdc++.h>
using namespace std;
int main() {
int m=5,n=2;
float f=m/n;
cout<<f;
return 0;
}
What is the output of the following C program?
main()
{
unsigned char p;
p=-1;
printf("%d",p);
}
What error will be generated when using an incorrect format specifier for the data type being read?
Which of the following statements is used to free the allocated memory space for a program?
What will be the output of the following C++ code?
#include<iostream>
using namespace std;
int main ()
{
int cin;
cin >> cin;
cout << "cin: " << cin;
return 0;
}
#include <iostream>
#include <functional>
#include <algorithm>
using namespace std;
int main ()
{
int numbers[] = {10, -20, -30, 40, -50};
int cx;
cx = count_if ( numbers, numbers + 5, bind2nd(less<int>(), 0) );
cout << cx;
return 0;
}