What is the default return type of functions in C++?
What is the type of the first item in the heap?
What is the output of the following C program?
void main()
{
int a[0];
a[0]=10;
printf("%d",*a);
}
What is the output of the following C program?
#include<stdio.h>
#
int main()
{
char arr[] = " helloforhello ";
printf("%d", sizeof(arr));
getchar();
return 0;
}
What will be the output of the following program
#include <stdio.h>
int main()
{
int a, b = 6;
float c = 7;
a = c % b;
printf("%d", a);
return (0);
}
Suppose a C program has a floating constant of 1.414, what's the best way to convert this to a "float" data type?
What are the two types of user-defined conversions in programming?
What is the output of the following C program?
int main()
{
int i=2, j=3, k=1;
swap(i, j);
printf("%d %d", i, j);
return 0;
}
void swap(int a, int b)
{
int temp;
temp = a; a = b; b = temp;
}
Which of the following statement is incorrect?
#include "stdlib.h"
int main()
{
int *pInt;
int **ppInt1;
int **ppInt2;
pInt = (int*)malloc(sizeof(int));
ppInt1 = (int**)malloc(10*sizeof(int*));
ppInt2 = (int**)malloc(10*sizeof(int*));
free(pInt);
free(ppInt1);
free(*ppInt2);
return 0;
}
Choose the correct statement with respect to the above C program.