English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

4 answers

#include
void main()
{

static int var = 5 ;
static int result = 1 ;

result *= var ;

printf(" \n %d ", var--) ;
printf(" \n Result is %d ", result) ;

if(var)
{
main() ;
}

return ;
}

2007-02-23 19:05:28 · answer #1 · answered by Innocence Redefined 5 · 1 1

There's a concept called linked list where you create structured which have pointers which point to the structure itself.

Thus you can create a list of structure entities that point 1 after the other. This is a substitute to arrays.

Its an entire subject in itself. Try Tannenbaum's book on Data Structures.

2007-02-24 02:25:42 · answer #2 · answered by Amlan 2 · 0 1

You don't need to code the math itself using pointers. Just use the pointers for accessing variables, parameter passing, etc.

2007-02-24 02:07:39 · answer #3 · answered by Melvin 4 · 0 1

#include

int main(char[][] args) {

static int var = 5 ;
static int result = 1;
static int* pointer = &result;

for (int i = var;i>=var;var--) {
*pointer *=var;
}

printf(" \n Result is %d ", result) ;

return 0;
}

2007-02-24 03:42:19 · answer #4 · answered by gjmb1960 7 · 0 1

fedest.com, questions and answers