ユーザー名: パスワード:
新ユーザー登録
管理人: toedder 
 Computers

Have computer questions, hints, or tips?

BBW's Tips on how to speed up page load the brainking site
Computers (BIG BAD WOLF, 2007-03-12 20:16:01)



dvd playersには何が新しい?
掲示板表
モード: 誰でも投稿可能
メールの内容の検索:  

18. 2月 2005, 16:45:49
Chessmaster1000 
件名: I want a tiny help............
Chessmaster1000 (18. 2月 2005, 16:46:40)に変更されました。
As i'm in my very first steps at C i need a little help some times.....
One thing i can't do is the following, so if anyone has any idea of how, then please...........:
--------------------------

-----------------------------------
In the following code-1 example the output is:
c[0]= 4
c[1]= 44
c[2]= 84
c[3]= 104
--------------------------------------------

-----------------
Code-1:
////////////////
//
#include <stdio.h>
void f1(int a[]);

void main(void)
{
int c[4],i;
f1(c);
for (i=0;i=3;i++) printf("c[%d]= %d\n",i,c[i]);
}

void f1(int a[])
{
a[0]=4;
a[1]=44;
a[2]=84;
a[3]=10

4;
}
/////////////////////

What i want is to have the same output as before BUT not to declare one by one the values of the a[]. But the following logical way isn't working

//////////////////////


#include <stdio.h>
void f1(int a[]);

void main(void)
{
int c[4],i;
f1(c);
for (i=0;i=3;i++) printf("c[%d]= %d\n",i,c[i]);
}

void f1(int a[])
{
int a[4]={4,44,84,104};
}

//////////////////////


Why??????????????????????? And how i can do it...........?

日時
オンライン友達
気に入り掲示板
同好会
今日のアドバイス
著作権 © 2002 - 2024 Filip Rachunek.
上へ