int main()
{
int a = 17 / 5;
printf("%d", a);
return 0;
}
#include<stdio.h>
int main()
{
int a=1,b=3,c=2,d=4;
printf("%d", a<<b+c <<d;
retrun 0;
}
Which header file must be included to use dynamic memory allocation functions in C?
Which of the following access specifier is used as a default in a class definition?
What is the output of the following C program?
int main()
{
int i=2, j=3, k=0;
int p;
p = (i, k, j);
printf("%d", p);
}
#include
What is the output of the following C code?
#include<stdio.h>
int main()
{
int i, j, k = 0;
if(k)
printf("hello\n");
else
printf("hi\n");
printf("end\n");
}
Which of the following statements about new and malloc are correct?
i) new is an operator whereas malloc is a function
ii) new calls the constructor, malloc does not
iii) new returns the required pointer type, whereas malloc returns a void* pointer that needs to be type-cast
Which of the following statements is correct about the program given below?
class Bix
{
public:
static void MyFunction();
};
int main()
{
void(*ptr)() = &Bix::MyFunction;
return 0;
}
What is the property of the partial_sort function provided by the STL algorithm?