Declarations And Initializations(C Programming ) Questions and Answers
Explanation:-
Answer: Option B. -> NoThe only way this can be achieved is to define the variable locally in main() instead of
defining it globally and then passing it to the functions which need it.
Explanation:-
Answer: Option A. -> YesNo answer description available for this question.
Explanation:-
Answer: Option A. -> TrueTrue, When a function is declared inside the source file, that function(local function)
get a priority than the extern function. So there is no need to declare a function as
extern inside the same source file.
Explanation:-
Answer: Option A. -> True
True, we can find the size of short integer and long integer using the sizeof()
operator.
Example:
#include<stdio.h>
int main()
{
short int i = 10;
long int j = 10;
printf("short int is %d bytes., nlog int is %d bytes.",
sizeof (i), sizeof(j));
return 0;
}
Output:
short int is 2 bytes.
long int is 4 bytes.