function(int ptr);
function(int *ptr);
function(*ptr);
function(ptr *int);
print()
scanf()
input()
All of the above
An array of characters
The object of some class
Same as other primitive data type
Linkedlist of characters
for loop
while loop
do-while loop
None of the above
float arr[10];
float arr(10);
float arr = [10];
array float arr[10];
What is the output of the following code?
int x = 5; if (x > 3) { printf("Greater than 3"); } else { printf("Not greater than 3"); }
Greater than 3
Not Greater than 3
Error
No Output
Variables of the same type
Variables of the different type
Functions and variables
Only functions
perror()
fprintf()
strerror()
printf()
sizeof(a)
sizeof(a[0])
sizeof(a) / sizeof(a[0])
sizeof(a) * sizeof(a[0])
-1
1
Null
EOF
They are compiled
They are replaced by their corresponding values
They are ignored
They are executed
Read
Write
Execute
Copy
malloc()
free()
calloc()
realloc()
Consider the following code and How many bytes of memory will be allocated?
int *ptr = (int *) malloc(10 * sizeof(int));
10 bytes
20 bytes
80 bytes
40 bytes
Input data
The program does not require any function.
Output data
The program must have at least one function.
What is the output of this statement
printf("%d", (a++));
The value of (a + 1)
Error message
Garbage
The current value of a
Using malloc() without free()
Using calloc() without realloc()
Using pointers incorrectly
break
continue
return
exit
In the following nested conditional statements, which branch will execute?
int x = 4; if (x > 2) { if (x < 5) { printf("x is between 2 and 5"); } } else { printf("x is 2 or less"); }
x is between 2 and 5
x is 2 or less
No output
The size of the largest member
The sum of the sizes of all members
Twice the size of the largest member
Size of the smallest member