User Profile
Collapse
-
Thank you for all answers, I'll try -
Code:int count(int thearray[]){ int count, i; i=0; count=0; printf("%d\n", count); while (thearray[i]!='\0'){ count++; i++; } printf("%d\n", count); return count; } int Max(int thearray[]) { int max = thearray[0]; // first element be the max
Leave a comment:
-
thank you for your answer, but what I need to find is the size of array (length of array of integer) maybe I said it not clear enough, sorry
I've used sizeof [n] but it returns me same value each time (4) I don't know why
where n is array of integer, which I assign numbers of integer into it
please helpLeave a comment:
-
how to know size of integer array?
Been bothering me so long, we can find the size of string array (array of char) but what is the way to find the size for integer array? I've tried using while loop until it find '\0' null character, it's stop whenever integer 0 is encountered, which is not what I want .. anyone please help me -
thank you very much
but my compiler can't seem to find sys/dir.h
is there any way to correct it?
I'm using 2 compilers
DEV C++ (Bloodshed environment)
and also using UNIX GCC to compile the programLeave a comment:
-
How to display all filename of that extension using C
Dear all
Is there any way to show list of filename that we have on that current directory to the user?
Thanks -
Code://This procedure take in normal string and convert to single character rep //such as "(img1.tga over img2.tga) in img.tga" -> "(aOb)Ic" //And store image filename in string variables #include <stdio.h> #include <stdlib.h> #include <string.h> int oldtonew(char *oldstring,char *newstring){ int i,j,k,l,count,size; char *tempstring,
Leave a comment:
-
Dear all,
I've tried to allocate memory and I still got problem, could u please look at my program in the following post
It's been giving error "Segmentati on Error" message, I really don't know what is going wrong
Thank youLeave a comment:
-
-
Show list of file on local directory
Dear all
Is there any way to show list of filename that we have on that current directory to the user?
Thanks -
String problem in C
Dear all
I'm new here and also new to C language. I have been stuck with string problem in C for some time and I decide to post here to get some help, please kindly explain what I get wrong with the code
char *ptr, *old2, *oldstring);
printf("\nEnter oldstring expression :");
gets(oldstring) ;
printf("\n%s : old2", old2);
ptr = strcpy(old2, oldstring);
printf("\n%s...
No activity results to display
Show More
Leave a comment: