User Profile

Collapse

Profile Sidebar

Collapse
rola248
rola248
Last Activity: Mar 28 '10, 06:32 PM
Joined: Jul 19 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • rola248
    started a topic Getting array values using strtok
    in C

    Getting array values using strtok

    hi all,
    if we use strtok toseparate a line into two parts,say rola : 23

    Code:
    for(i=0;i<index;i++){
    ptr=strtok(line[i],":");
    while(ptr!=NULL)
    {
    strcpy(num[i],ptr);
    ptr=strtok(NULL,":");
    }
    }
    the second part(23) is saved in the array num,,,,,how do we save the first part(rola) in a second array???
    See more | Go to post

  • rola248
    started a topic ".....exe stopped woking"!!
    in C

    ".....exe stopped woking"!!

    hi,
    after compiling my program and having no errors or warnings,and when running it i get this message:"main.e xe has stopped working"....
    i can't fix this problem,,,can anyone help plz????
    See more | Go to post

  • rola248
    replied to error detection
    in C
    the first expression is not legal,it should be:
    12-36
    this is what came to my mind,i know it's not efficient because it doesn't take (,) into consideration,i haven't heard of (lex and flex) before,how can i use them for this purpose??...
    See more | Go to post

    Leave a comment:


  • rola248
    started a topic error detection
    in C

    error detection

    I'd like to ask,if i have some equations in a text file such as:
    1) 2+45-43
    2) 28+50-3
    3) 12++36
    i need a function that detects the error (eq. 3) when reading the file.is there any possible way to do this in c????
    See more | Go to post

  • rola248
    replied to null char in c
    in C
    thanx,but why it doesn't work when i use 6 for both arrays?i mean they both don't end with the null char so why aren't they equal??
    See more | Go to post

    Leave a comment:


  • rola248
    started a topic null char in c
    in C

    null char in c

    hi,
    I have this code,why is the displayed result "false"?
    Code:
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    int main()
    {
       char name[6]="MEHMET"; /* 6 characters */
       char name1[6]="MEHMET";
    if (strcmp(name,name1) == 0){
    printf("true");
    }else{
    printf("false");
    }
    return 0;
    ...
    See more | Go to post

  • rola248
    replied to ineed help...
    in C
    the main problem is that i can't read names seperately and put them into an array,and then the numbers into a parallel multidiminsiona l array;the output should be like this:
    zeinab 100 90 80
    ahmad 70 75 45
    .....
    See more | Go to post

    Leave a comment:


  • rola248
    started a topic ineed help...
    in C

    ineed help...

    i need to write a c program that reads information from a txt file into two parallel multidiminsiona l arrays,the problem is that the data is organised like:
    Zeinab
    100 90 80
    Ahmad
    70 75 45
    Manal
    90 99 98
    Iyad
    80 80 80 the out put is a table with five columns the fifth one should compute the average of the highest grade for each student.(struct ures are not allowed).plz help before tuesday...
    See more | Go to post
    Last edited by JosAH; Jul 19 '09, 10:59 AM. Reason: added [code] ... [/code] tags
No activity results to display
Show More
Working...