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

Differentiate between a structure and a union.

0 Answers   Zensar,


Discuss the function of conditional operator, size of operator and comma operator with examples.

0 Answers   TCS,


What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }

1 Answers  


write a c program to convert fahrenheit to celsius?

4 Answers   TCS,


suppose we use switch statement and we intilize years name using enum statement like(jan,feb,mar,------dec) we take integer value as an input .question is that the month which we analyz is from 0 to 11 bt if i enter 12 than how he again starts from begning and print jan

1 Answers  






Give the rules for variable declaration?

0 Answers  


What are volatile variables in c?

0 Answers  


What is the difference between int main and void main in c?

0 Answers  


Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?

0 Answers  


what would be the output of the following program main() { int a[] = {1,2,3,4,5}; int *ptr = {a,a+1,a+2,a+3,a+4}; printf("%d %d %d %d",a,*ptr,**ptr,ptr); } }

1 Answers  


Explain how to reverse singly link list.

0 Answers  


Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +

1 Answers  


Categories