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


Please Help Members By Posting Answers For Below Questions

Describe the order of precedence with regards to operators in C.

633


What is a MAC Address?

628


Are pointers integer?

551


How old is c programming language?

581


What is else if ladder?

610






What are different types of pointers?

563


What do mean by network ?

660


What does %2f mean in c?

676


Can you tell me how to check whether a linked list is circular?

772


What is data structure in c language?

608


How can I make it pause before closing the program output window?

581


hi any body pls give me company name interview conduct "c" language only

1669


What is a built-in function in C?

797


Write a program to print "hello world" without using a semicolon?

597


Why header file is used in c?

577