Which of the following operators in C++ cannot be overloaded?
Which C standard library function sets the first n characters of a string to a given character?
Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?
Which components are present in the basic interface of an allocator class?
What is the output of the following code?
#include<stdio.h>
int main()
{
int c=-1, b=2,d;
d= ++c && b++;
printf("%d", b);
printf("%d",c);
}
Which of the following statement is correct?
What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires four bytes of memory.
int main() {
unsigned int x[4][3] = {{1,2,3},{4,5,6},{7,8,9},{10,11,12}};
printf("%u, %u, %u", (unsigned)x, (unsigned)(x+3), (unsigned)(*(x+2)+3));
}
What is the purpose of the Unitbuf Flag in C++?
Consider the following program:
#include <stdio.h>
int main()
{
int n1, n2, i, z;
printf("Enter two integers: ");
scanf("%d %d", &n1, &n2);
for(i=1; i <= n1 && i <= n2; ++i)
{
if(n1%i==0 && n2%i==0)
z = i;
}
printf("%d", z);
return 0;
}
If n1=4 and n2=6, what will be the output of the following program?