Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
What is the output of the program? #include<stdio.h> int main() { extern int a; printf("%d\n", a); return 0; } int a=20;
The output of the following 'C' program main() { extern, int a; printf("\n%d",a)' } int a =20 Output:- Garbage value We have only declared the variable, and not initialized it, which means that the block of memory that has been allocated to the variable still contains some value that has been left oRead more
The output of the following ‘C’ program
main()
{
extern, int a;
printf(“\n%d”,a)’
}
int a =20
Output:-
Garbage value
We have only declared the variable, and not initialized it, which means that the block of memory that has been allocated to the variable still contains some value that has been left over from previous programs and operations. That value is called a garbage value.
See lessWhat will be the output of the program in 16 bit platform (Turbo C under DOS)? #include<stdio.h> int main() { extern int i; i = 20; printf("%d\n", sizeof(i)); return 0; }
The program will result in a compile-time error because the variable i is declared as extern , which means that it is not defined within the scope of the program.
The program will result in a compile-time error because the variable i is declared as extern , which means that it is not defined within the scope of the program.
See lessWhat is the output of the program given below ? #include<stdio.h> int main() { enum status { pass, fail, atkt}; enum status stud1, stud2, stud3; stud1 = pass; stud2 = atkt; stud3 = fail; printf("%d, %d, %d\n", stud1, stud2, stud3); return 0; }
The program will result in a compile-time error because the variable i is declared as extern , which means that it is not defined within the scope of the program.
The program will result in a compile-time error because the variable i is declared as extern , which means that it is not defined within the scope of the program.
See lessIn the following program where is the variable a getting defined and where it is getting declared? #include<stdio.h> int main() { extern int a; printf("%d\n", a); return 0; } int a=20;
The variable a is declared and defined as a global variable in the line: int a = 20;. The extern line just tells the main() function scope
The variable a is declared and defined as a global variable in the line: int a = 20;. The extern line just tells the main() function scope
See lessIdentify which of the following are declarations 1 : extern int x; 2 : float square ( float x ) { … } 3 : double pow(double, double);
Expert-Verified Answer Both 1 and 3 are declarations. double pow(double, double); - is a function prototype declaration.
Expert-Verified Answer
See lessBoth 1 and 3 are declarations. double pow(double, double); – is a function prototype declaration.
Is the following statement a declaration or definition? extern int i;
extern int i; is a declaration (no memory allocation), while. int i; is a definition (memory is allocated). Aren't both statements only declaring a variable i as an int , only that one specifies that it's a global variable?
extern int i; is a declaration (no memory allocation), while. int i; is a definition (memory is allocated). Aren’t both statements only declaring a variable i as an int , only that one specifies that it’s a global variable?
See lessWhich of the following is not user defined data type?
So, clearly long int l = 2.35; is not User-defined data type. (i.e.long int l = 2.35; is the answer.)
So, clearly long int l = 2.35; is not User-defined data type. (i.e.long int l = 2.35; is the answer.)
See lessBy default a real number is treated as a
Explanation: By default, a real number is treated as a float variable.
Explanation: By default, a real number is treated as a float variable.
See lessWhich of the following special symbol allowed in a variable name?
A variable name may begin with a letter or an underscore. Other than underscore(_), no other special symbol can be used in a variable name.
A variable name may begin with a letter or an underscore. Other than underscore(_), no other special symbol can be used in a variable name.
See lessHow would you round off a value from 1.66 to 2.0?
20) How would you round off a value from 1.66 to 2.0? The correct option is (b). Explanation: The ceil(1.66) is used for round off a value from 1.66 to 2.0.
20) How would you round off a value from 1.66 to 2.0? The correct option is (b). Explanation: The ceil(1.66) is used for round off a value from 1.66 to 2.0.
See less