#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
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 |
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 |
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 |
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 |
Write a c code segment using a for loop that calculates and prints the sum of the even integers from 2 to 30, inclusive?
Explain in detail how strset (string handling function works )pls explain it with an example.
What are the types of c language?
When can a far pointer be used?
Do you know the use of 'auto' keyword?
Which one would you prefer - a macro or a function?
What is a volatile keyword in c?
what is an inline fuction??
ABCDCBA ABC CBA AB BA A A
How can I copy just a portion of a string?
In header files whether functions are declared or defined?
whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.