What is the output of the following code?
int a = 10, b = 5; printf("%d", a / b);
5
2
0.5
15
int func();
func() int;
function int func();
declare int func();
char str[] = "Hello";
char str = "Hello";
string str = "Hello";
char str[] = {'H', 'e', 'l', 'l', 'o'};
It allows the use of multiple alternatives for an expression
It is used to execute code conditionally based on the evaluation of a Boolean expression
It is used to execute a sequence of statements multiple times
It allows the execution of code based on multiple expressions
It is used to define global variables
It is used to define a macro
It is used to include standard or user-defined header files in the program
It is used to include comments in the code
A function can call itself
A function cannot call itself
Recursion is not supported in C
Recursion is the same as iteration
It is used to define a function prototype
It is used to define a structure
It is used to create an alias for an existing data type
int a = 5, b = 10; if (a < b) printf("a is less than b"); else printf("a is greater than or equal to b");
a is greater than or equal to b
a is less than b
Compiler Error
Undefined
int my_num = 100,000;
int my_num = 100000;
int my num = 1000;
int $my_num = 10000;
They execute programs faster than compilers
They translate the entire program at once
They translate and execute code line by line
They are not used in modern programming
int
float
include
char
0
1
-1
Depends on array size
4
8
16
The value of the variable it points to
The size of the pointer
The memory address of the variable it points to
Garbage value
fclose()
closefile()
fileclose()
endfile()
A collection of variables of different data types
A collection of elements of the same data type stored in adjacent memory locations
A single variable that stores multiple values
None of the above
Moves the file pointer to a specific location
Reads a file
Writes to a file
Closes a file
Dereferences a pointer
Returns the value of a variable
Returns the address of a variable
Multiplies two values
"r"
"w"
"rw"
"read"
A structure can store multiple data types, a union cannot
A union can store multiple data types, a structure cannot
In a structure, only one member can be accessed at a time
In a union, only one member can be accessed at a time