How many types of polymorphisms are supported by C++?
What is the output of the following C program?
How many maximum number of parameters does a string constructor can take?
int **ptr; is?
A collection of generic classes and functions is called a
What is the purpose of the .* operator in programming?
#include<stdio.h>
void square(int *number)
{
*number = *number * *number;
return;
}
int main()
{
int number = 5;
square(&number);
printf("%d\n", number);
}
What is the output of the following C code?
#include<stdio.h>
int main()
{
int a=10;
switch(a)
{
case a: printf("hello\n");break;
case 10:printf("hello10\n");
default:printf("default");break;
}
}
What does the getche() function do?
#include <iostream>
using namespace std;
int addition (int a, int b)
{ return (a+b); }
int subtraction (int a, int b)
{ return (a-b); }
int operation (int x, int y, int (*functocall)(int,int))
{
int g;
g = (*functocall)(x,y);
return (g);
}
int main ()
{
int m,n;
int (*minus)(int,int) = subtraction;
m = operation (7, 5, addition);
n = operation (20, m, minus);
cout <<n;
return 0;
}