main()
{
int arr[5]={23,67};
printf("%d%d%d",arr[2],arr[3],arr[4]);
}

Answers were Sorted based on User's Feedback



main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / vikas upendra

The rest will be initialized to zero ....so it'll be 000 ..

Is This Answer Correct ?    25 Yes 4 No

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / jaga

in linux it will give garbage values...
in unix it will give 000(automatically initialized to 0)

Is This Answer Correct ?    11 Yes 2 No

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / vignesh1988i

all wil print the garbage values in the respected
memories... since we only initilized for two locations in
th array.... so other locations in the array wil have
garbage values

Is This Answer Correct ?    13 Yes 9 No

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / bsn.teja

till array elements are not given any specific values,they
are supposed to contain garbage values.
here we initialised only 1st two elements of the array.
so output will be garbage values.

Is This Answer Correct ?    2 Yes 0 No

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / kantilal

000

Is This Answer Correct ?    5 Yes 4 No

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / guruprasad

first a[0]=23;
a[1]=67;
rest index are assigned 0 0 0.

Is This Answer Correct ?    1 Yes 0 No

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / ismail

garbage value

Is This Answer Correct ?    5 Yes 5 No

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / abhisheksingh462

000

Is This Answer Correct ?    0 Yes 0 No

main() { int arr[5]={23,67}; printf("%d%d%d",arr[2],arr[3],arr[4]); }..

Answer / honey

000 PRINTED

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More C Interview Questions

Is c is a low level language?

0 Answers  


I need previous papers of CSC.......plz help out by posting them.......

0 Answers  


What is the main difference between calloc () and malloc ()?

0 Answers  


How do you define CONSTANT in C?

0 Answers   ADP,


How many levels of pointers can you have?

0 Answers  






Explain Basic concepts of C language?

0 Answers   EXL,


how to print a statement in c without use of console statement ,with the help of if statement it should print

2 Answers   Satyam,


Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning

4 Answers   Accenture,


Explain how do you determine whether to use a stream function or a low-level function?

0 Answers  


What is the explanation for prototype function in c?

0 Answers  


Write a program to check palindrome number in c programming?

0 Answers  


Is c an object oriented programming language?

1 Answers  


Categories