void main()
{
int a[]={1,2,3,4,5},i;
for(i=0;i<5;i++)
printf("%d",a++);
getch();
}
Answer Posted / chhaya
Here , in program array is given of 5 element. But at d
time of printing output ,increase address not pointer
i.e.
a[i]={1,2,3,4,5}
then u wnat to print array
Printf("%d",i++);
getch();
this sentence is requird. because array is set of element
and element is pointed by "pointer". If u wnt to show
element then use pointer not address of array.....
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is difference between Structure and Unions?
What happens if a header file is included twice?
What is the significance of scope resolution operator?
Is sizeof a keyword in c?
Which is better between malloc and calloc?
Write the Program to reverse a string using pointers.
Can we add pointers together?
Explain what is the stack?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
Why is c known as a mother language?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
Where register variables are stored in c?
What are volatile variables in c?
what are # pragma staments?