HARD
HSSC Clerk
IMPORTANT
Earn 100

Which function definition will run correctly?
(a)int sum(int a, int b) return (a+b);
(b)int sum(int a, int b)p{ return (a+ b);}
(c)intsum(a, b) return (a+ b)
(d)Both (a) and(b)
(e)None of these

50% studentsanswered this correctly

Important Questions on Programming in C/C++
HARD
HSSC Clerk
IMPORTANT
Can we use a function as a parameter of another function? Eg: void wow(int func()) ;

HARD
HSSC Clerk
IMPORTANT
The value obtained in the function is given back to the main function by using _____ keyword.

EASY
HSSC Clerk
IMPORTANT
The function _____ obtains block of memory dynamically.

HARD
HSSC Clerk
IMPORTANT
void * malloc(size_t n) returns:

MEDIUM
HSSC Clerk
IMPORTANT
calloc() returns a storage that is initialised to _____.

MEDIUM
HSSC Clerk
IMPORTANT
Which of the following statements should be used to obtain a remainder after dividing by ?

MEDIUM
HSSC Clerk
IMPORTANT
By default, a real number is treated as a _____

MEDIUM
HSSC Clerk
IMPORTANT
Which of the following is not user defined data type ?
1. struct book
{
char name[];
float price;
int pages;
};
2. long int = ;
3. enum day{Sun,Mon,Tue,Wed};
