Program to define an array in c, C/C++ Programming

Program to define an array in c:

Write a program to define an array and print the value of array.

void main()

{

int a[10]={0,11,21,34,44,75,46,57,88,89},i,j,k;

clrscr();

printf("a=%d\n",a);

for (k=0;k<=9;k++)

{

printf("*(a+%d)=a[%d]=%d\n",k,k,*(a+k));

printf("*a+%d=%d\n",k,*a+k);

}

getch();

}

Posted Date: 10/19/2012 3:00:21 AM | Location : United States







Related Discussions:- Program to define an array in c, Assignment Help, Ask Question on Program to define an array in c, Get Answer, Expert's Help, Program to define an array in c Discussions

Write discussion on Program to define an array in c
Your posts are moderated
Related Questions
Description A long time ago in a galaxy far, far away, the country Mafghanistan had n cities and m old roads, where each road connected a pair of cities. Due to the treacherous mo

What is the difference among a copy constructor and an overloaded assignment operator? Ans) A copy constructor constructs a latest object by using the content of the argument

Receive 3 numbers and display them in ascending order from smallest to largest ed#

#questionhow can i add new customer and alot him a new unique id ..

switch statement

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Array types An array is a collection of objects of a one data type. The individual objects are accessed by their position in the array. This way of accessing is known as indexi


This problem familiarizes you with using random numbers in C++. The program is to compute a good approximation of π using a simulation method called "Monte Carlo". The following fi

example of program to ad two numbers