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
accept principal amount,rate of interest, & duration from the user. display interest amount and total amount


F r i e n dly Function: A class can have public members and private members.   The public member can be used through the class using dot operator.   Where as private me

If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your mission (sho

Relational Operators A relational operator is used to make comparison among two values. All these operators are binary and needs two operands. There are the following relationa

Write a C++ program with header and source files to store street addresses using the Doubly Linked List ADT. Modify the Node class from Lab Assignment 3 so that it becomes a node i

how to get plus asterisk pattern

Write a C program to compute the factorial of  5 i.e 1x2x3x4x5 etc #include stdio.h   void main()   {   char promt;      int factor;   factor = 1*2*3*4*5;   printf("The fac

Write a program to get the largest element in an array using Function? # include int largest(int b[],int); main() { int lar,a[5]={12,2,36,40,5}; lar=largest(a,n); printf("

Conversion from Basic to User-Defined variable Consider the following example. class Distance                  {                   public  :