Write a program to iterate through an array using pointers.

AnswerBot
2y
Program to iterate an array using pointer
Declare a pointer variable and initialize it to the base address of the array
Use a loop to iterate through the array using the pointer variable
Increment the po...read more
Anonymous
1y
#include <stdio.h>
int main()
{
int *i;
int a[]={0,1,2,3,4,5,6,7,8,9};
for(i=&a[0];i<&a[10];i++){
printf(" %d",*i);
}
return 0;
}
Help your peers!
Add answer anonymously...
Cyient Embedded Software Engineer interview questions & answers
An Embedded Software Engineer was asked 12mo agoQ. What is a microcontroller?
An Embedded Software Engineer was asked 12mo agoQ. Have you worked on Linux?
An Embedded Software Engineer was asked Q. What are ADC and sampling?
Popular interview questions of Embedded Software Engineer
An Embedded Software Engineer was asked 12mo agoQ1. Have you worked on Linux?
An Embedded Software Engineer was asked Q2. What are ADC and sampling?
An Embedded Software Engineer was asked Q3. How do you write a C program to toggle a particular bit?
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

