Which of the following operator is overloaded for object cout?
#include<stdio.h>
int main()
{
float a=3.5;
printf("%f %f",a,a);
}
Which of the following functions must use a reference parameter?
#include<stdio.h>
int main()
{
int a=10,b=15;
printf("=%d",(a+1),(b=a+2));
printf(" %d=",b);
return 0;
}
Which of the following concepts means waiting until runtime to determine which function to call?
#include<iostream>
using namespace std;
void swap (int& first, int& second)
{
int temp = first;
first = second;
second = temp;
}
int main()
{
int a = 2, b = 3;
swap( a, b );
cout << a << b;
return 0;
}
Declare a pointer to a function that accepts three pointers to integer quantities as arguments and returns a pointer to a floating-point quantity.
How can you print "Hello World" without using a semicolon?
What will be the output?
#include <stdio.h>
int main()
{
char * _ptr = NULL;
_ptr = malloc(0);
if(_ptr==NULL) printf("_ptr is NULL");
else printf("_ptr not NULL");
printf(" %p ", _ptr);
*_ptr = '@';
printf(" %c ", *_ptr);
free(_ptr);
return 0;
}