User Profile

Collapse

Profile Sidebar

Collapse
kujahleague
kujahleague
Last Activity: Aug 26 '06, 10:28 PM
Joined: Jul 12 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kujahleague
    replied to how to know size of integer array?
    in C
    Thank you for all answers, I'll try
    See more | Go to post

    Leave a comment:


  • kujahleague
    replied to how to know size of integer array?
    in C
    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
    ...
    See more | Go to post

    Leave a comment:


  • kujahleague
    replied to how to know size of integer array?
    in C
    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 help
    See more | Go to post

    Leave a comment:


  • kujahleague
    started a topic how to know size of integer array?
    in C

    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
    See more | Go to post

  • 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 program
    See more | Go to post

    Leave 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
    See more | Go to post

  • kujahleague
    replied to String problem in C
    in C
    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,
    ...
    See more | Go to post

    Leave a comment:


  • kujahleague
    replied to String problem in C
    in C
    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 you
    See more | Go to post

    Leave a comment:


  • kujahleague
    replied to String problem in C
    in C
    Thank you very much, I'll see if that helps
    See more | Go to post

    Leave a comment:


  • kujahleague
    started a topic Show list of file on local directory
    in C

    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
    See more | Go to post

  • kujahleague
    started a topic String problem in C
    in C

    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...
    See more | Go to post
No activity results to display
Show More
Working...