main()

{

printf("%d", out);

}

int out=100;

Answers were Sorted based on User's Feedback



main() { printf("%d", out); } int out=100;..

Answer / akshata

compile time error:
undefined symbol 'out'

Is This Answer Correct ?    9 Yes 1 No

main() { printf("%d", out); } int out=100;..

Answer / susie

Answer :

Compiler error: undefined symbol out in function main.

Explanation:

The rule is that a variable is available for use from the
point of declaration. Even though a is a global variable, it
is not available for main. Hence an error.

Is This Answer Correct ?    6 Yes 0 No

main() { printf("%d", out); } int out=100;..

Answer / lucky varshney

100
bcz int out=100is globle diclearation

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More C Code Interview Questions

main() { int i; clrscr(); printf("%d", &i)+1; scanf("%d", i)-1; } a. Runtime error. b. Runtime error. Access violation. c. Compile error. Illegal syntax d. None of the above

1 Answers   HCL,


write a simple calculator c program to perform addition, subtraction, mul and div.

0 Answers   United Healthcare, Virtusa,


How can I Create a C program in splitting set of characters to specific subsets. Example: INPUT SET OF CHARACTERS: Therefore, my dear brothers and sisters, stand firm. Let nothing move you. Always give yourselves fully to the work of the Lord, because you know that your labor in the Lord is not in vain. SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10 OUTPUT: Therefore, my dear b rothers an d sisters, stand fir m. Let not hing move you. Alway s give you rselves fu lly to the work of t he Lord, b ecause you know that your labo r in the L ord is not in vain.

0 Answers  


main() { int i =0;j=0; if(i && j++) printf("%d..%d",i++,j); printf("%d..%d,i,j); }

1 Answers  


main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }

2 Answers   IBM,






Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.

2 Answers  


Derive expression for converting RGB color parameters to HSV values

1 Answers  


#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }

1 Answers  


how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.

19 Answers   Cap Gemini, Infosys,


Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }

1 Answers  


void func1(int (*a)[10]) { printf("Ok it works"); } void func2(int a[][10]) { printf("Will this work?"); } main() { int a[10][10]; func1(a); func2(a); } a. Ok it works b. Will this work? c. Ok it worksWill this work? d. None of the above

1 Answers   HCL,


Write a Program that Inputs 10 Numbers in an Array and Show the Maximum Number

2 Answers   Ace Info,


Categories