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
# include stdio.h> # include conio.h> # include math.h>   void main () { int a=1,sqr=0,cube=0; clrscr (); while (a { sqr=pow(a,2); cube=pow(a,3);

Virtual Base Classes This ambiguity can be resolved if the class derived have only one copy of the class base. This can be done by making the base class a virtual class. This k

Temperature Conversions. Problems 28 through30generate temperature-conversion tables. Use the following equations that give relationships between temperatures in degrees Fahrenheit

Each function has its own stack frame between %fp and %sp. Let Caller calls Callee. Then Caller's %sp becomes callee's %fp, and callee's %sp set to be a new value (a smaller one be

need some help with finishing a program

Armed with your function from above, we can do some interesting things. For instance, any pixel where the offsets are both zero is a pit (lower than all surrounding points) .

It is a pointer accessible only in the member functions of a struct, class or union type. It points to the object for which the member function is called. Static member functions d


Employ operator () instead of operator[]. While you have multiple subscripts, the cleanest way to do it is along with operator () instead of with operator[]. The reason is that

i need a program for finding the last fibonacci number