#include<stdio.h>
void main()
{
int a [5];
for (i=0; i<=4; i++)
printf(ā€œ%dā€ ,a[i]);
}

Answers were Sorted based on User's Feedback



#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā€..

Answer / kalyan chukka

Here it shows i is undefined Symbol.So if declare i as
integer then it prints some garbage value Because Array is
declared but elements are not inserted into the array.So
garbage value is printed on the console

Is This Answer Correct ?    10 Yes 1 No

#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā€..

Answer / neelima

it gives a garbage values

Is This Answer Correct ?    10 Yes 2 No

#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā€..

Answer / sameer mohammed

It shows us garbage values as because the integer type
array is declared but it is not defined.

Is This Answer Correct ?    6 Yes 2 No

#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā€..

Answer / jayakrishna

here array a is declared but it is not initialised,but int
the printf we are printing values of array a[], so it
displays garbage values & cannot directly write i as
variable we must specify its type.

Is This Answer Correct ?    4 Yes 1 No

#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā€..

Answer / tanvi jain

as i is not yet declared,so give an error.

Is This Answer Correct ?    0 Yes 0 No

#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā€..

Answer / purnima

it gives compile time error because here the var i is not
declared .aIn c a var must be declared before is usage

Is This Answer Correct ?    0 Yes 1 No

#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā€..

Answer / guest

0
1
2
3
4

Is This Answer Correct ?    0 Yes 5 No

#include<stdio.h> void main() { int a [5]; for (i=0; i<=4; i++) printf(ā€..

Answer / kapil

1 2 3 4 5

Is This Answer Correct ?    3 Yes 14 No

Post New Answer

More C Interview Questions

Give the Output : * * * * * * * * * *

2 Answers  


is forign key will be unique key any table or not?

2 Answers  


two variables are added answer is stored on not for third variable how it is possible?

3 Answers  


Which command is more efficient? *(ptr+1) or ptr[1]

3 Answers  


What are pointers? What are different types of pointers?

0 Answers   Fidelity,






What is the difference between pure virtual function and virtual function?

0 Answers  


write a program to print calender using for loop.

1 Answers   HCL, TCS,


what is the difference b/w NULL and null?

3 Answers   HSBC, IBM,


Write a program to check palindrome number in c programming?

0 Answers  


what is the output of below int n=10; (n++)++; printf("%d",n);

3 Answers  


Write an algorithm for a program that receives an integer as input and outputs the product of of its digits. E.g. 1234 = 24, 705 = 0

4 Answers  


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

0 Answers  


Categories