![]() |
C coding
Hi,
I need the coding to add 10 numbers using function and array and by not using pointers.whethet it is possible to add the numbers without using pointers.i need a clear idea about array and functions.If any one knows plaz help me. -Sakthi |
Re: C coding
Simple
Code: C
|
Re: C coding
Hi,
I need the coding without specifying the array size directly.that is u gave the array size as 10 na,for that we have to get the number from the user. -Sakthi |
Re: C coding
No problem juts use the pointer instead of aaray and use malloc to allocate the pointer and use like an array.
|
C coding
Hi,
Thanks for replying the previous program.I need a C coding for another program for finding the inverse of the matrix,sorting of the matrix,without using the pointers only by using the array.Please help me. -Sakthi |
Re: C coding
Please try to put it as a different thread as that will help even others to find the things easier.
|
Re: C coding
hi
i have one doubt regarding Strings.for reading the input from the keyboard we are using & for all other data type xcept string.can i know the reason y we are not using & for string in the scanf function. Sakthi |
Re: C coding
I didn't really get your question, kindly explain!
|
Re: C coding
Scanf needs a pointer to the variable. Consequently, the "address-of" operator (&) is applied to the name of the variable. A C-string is not a single "thing", but a collection of such things (chars). The name of the array is treated as a pointer to its first element. Since it's already a pointer, the address-of operator is not required.
As Shabbir mentions, please put separate questions in separate threads. It's a matter of organization and promotes searchability. |
Re: C coding
LOL! I took shakthi's '&' in the post for a literal AND and not the address-of operator!
|
| All times are GMT +5.5. The time now is 04:56. |