What will be the output of the following C++ code? #include <stdio.h> ...
View QuestionHow do we represent a wide character of the form wchar_t?
a) L’a’ b) l’a’ c) L[a] d) la Answer: a Explanation: A wide character is always ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int i = 3;
int l = i / -2;
int k = i % -2;
cout << l << k;
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()
{
char c = 74;
cout << c;
return 0;
}
What will be the output of the following C++ code? #include <iostream> ...
View QuestionWhich of the following belongs to the set of character types?
a) char b) wchar_t c) only a d) both wchar_t and char Answer: d Explanation: ...
View QuestionWhich of these expressions will isolate the rightmost set bit?
a) x = x & (~x) b) x = x ^ (~x) c) x = x & (-x) d) x ...
View QuestionWhich of these expressions will make the rightmost set bit zero in an input integer x?
a) x = x | (x-1) b) x = x & (x-1) c) x = x | (x+1) d) x ...
View Question
Given the variables p, q are of char type and r, s, t are of int type. Select the right statement?
1. t = (r * s) / (r + s);
2. t = (p * q) / (r + s);
Given the variables p, q are of char type and r, s, t are of int type. Select ...
View QuestionHow many characters are specified in the ASCII scheme?
a) 64 b) 128 c) 256 d) 24 Answer: ...
View Question
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
int x = -1;
unsigned int y = 2;
if(x > y)
{
cout << “x is greater”;
}
else
{
cout << “y is greater”;
}
}
What will be the output of the following C++ code? #include <iostream> ...
View Question