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 0 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() { if ((1||0) && (0||1)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

5 Answers   HCL,


#define DIM( array, type) sizeof(array)/sizeof(type) main() { int arr[10]; printf(“The dimension of the array is %d”, DIM(arr, int)); }

1 Answers  


Is the following code legal? struct a { int x; struct a *b; }

2 Answers  


What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }

1 Answers  


Find the largest number in a binary tree

7 Answers   Infosys,






typedef struct error{int warning, error, exception;}error; main() { error g1; g1.error =1; printf("%d",g1.error); }

1 Answers  


respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"

1 Answers   Genpact, Ozdocs,


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

0 Answers  


Hi, i have a project that the teacher want a pyramid of numbers in C# or java...when we click a button...the pyramid should be generated in a listbox/or JtextArea...and the pyramid should have the folowing form: 1 232 34543 4567654 567898765 67890109876 7890123210987 890123454321098 90123456765432109 0123456789876543210 Plz help with codes...didn't find anything on the net.

0 Answers  


main() { int x=5; clrscr(); for(;x==0;x--) { printf("x=%d\n”", x--); } } a. 4, 3, 2, 1, 0 b. 1, 2, 3, 4, 5 c. 0, 1, 2, 3, 4 d. none of the above

3 Answers   HCL,


main() { int i=-1; -i; printf("i = %d, -i = %d \n",i,-i); }

1 Answers  


1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?

2 Answers  


Categories