Like Tree4Likes

I am new to this forum

This is a discussion on I am new to this forum within the C Programming forums, part of the General Programming Boards category; What i want to make was a chracter whose whose chracter length is 20 mean it can have 20 chracters ...

  1. #16
    Registered User
    Join Date
    Nov 2012
    Posts
    22
    What i want to make was
    a chracter whose whose chracter length is 20 mean it can have 20 chracters !

  2. #17
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,681
    Quote Originally Posted by rajatahirqaiser View Post
    What i want to make was
    a chracter whose whose chracter length is 20 mean it can have 20 chracters !
    That's exactly an array of 20 characters
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  3. #18
    Registered User
    Join Date
    Nov 2012
    Posts
    22
    SDH

    Lvalue required in 46 48 and .................................( 25 LINES)

  4. #19
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    καλά!

    Raja, all your grade electronics, grade english, grade programming arrays, are too small. Minimum size for "A+" is 3 chars: A, + and the end of string char: '\0'.
    And you can't assign a string with the equal sign, you have to use string functions or:
    Code:
    grade_english[0]='A';
    grade_english[1]='+';
    grade_english[2]='\0';
    
    
    But if you can use strings, then it's easier (but #include <string.h>):
    strcpy(grade_programming,"A+");
    gpa_programming=4.0;
    strcpy(grade_programming,"Exceptional");
    Last edited by Adak; 01-12-2013 at 09:46 AM.
    std10093 likes this.

  5. #20
    Registered User
    Join Date
    Nov 2012
    Posts
    22
    Adak

    Didn't get you please explain !

  6. #21
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,681
    In C, we can not assign a variable with a string by the equal (=) operator.

    We have to use functions from string.h, like strcpy.

    Or you have to do it as Adak said.

    Adak, I guess google translate is your friend! Nice one!
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  7. #22
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    @Std, thought you'd like that - and yes, Google knows some Greek.

    Raja, the gpa_Variables, are OK, with the = assignment, but strings can't be assigned with the equal sign. Use strcpy(), as I've shown you , above. LOTS of errors there!

  8. #23
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,681
    Quote Originally Posted by Adak View Post
    @Std, thought you'd like that - and yes, Google knows some Greek.

    Raja, the gpa_Variables, are OK, with the = assignment, but strings can't be assigned with the equal sign. Use strcpy(), as I've shown you , above. LOTS of errors there!
    Adak, I have already "liked" it

    @Raja, too many said, take a 5min break and think of what was said. Then try to debug
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  9. #24
    Registered User
    Join Date
    Nov 2012
    Posts
    22
    means header should be


    Code:
    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    int main(void)
    {



    .................................................. ..................
    and In each i have to change from
    .................................................. .........


    Code:
    if(programming>=85)
    {
    grade_programming="A+";
    gpa_programming=4.0;
    grade_programming="Exceptional";
    }

    to






    Code:
    if(programming>=85)
    {
    strcpy(grade_programming,"A+");
    strcpy(gpa_programming,"4.0");
    strcpy(grade_programming,"Exceptional");
    }

  10. #25
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    This is how the first few lines of your program should look:

    Code:
    #include<stdio.h>
    #include<string.h>
    #include<conio.h>
    int main(void)
    {
    
    
    					    /* Getting Inital Values */
    
    
    int english,electronics,programming,itc,calculus;
    int sum,roll;
    //char grade_total[];
    char grade_english[3];
    char grade_electronics[3];
    char grade_programming[3];
    char grade_itc[5];char grade_calculus[5];
    float gpa_english,gpa_electronics,gpa_programming,gpa_itc,gpa_calculus;
    float percentage;
    char name[20];
    //char remarks_total;
    char remarks_english[10],remarks_electronics[10],remarks_programming[10],remarks_itc[10],remarks_calculus[10];
    
    
    					    /* Getting User Personal Info */
    
    
    printf("\n Please Enter Your Name : ");
    scanf("%d",name);
    printf("\n Please Enter Your Roll Number : ");
    scanf("%d",&roll);
    
    
    					    /* Getting User Academic Record */
    
    
    printf("\n Please Enter Your Marks in Programming : ");
    scanf("%d",&programming);
    printf("\n Please Enter Your Marks in Electronics : ");
    scanf("%d",&electronics);
    printf("\n Please Enter Your Marks in I.T.C : ");
    scanf("%d",&itc);
    printf("\n Please Enter Your Marks in Calculus : ");
    scanf("%d",&calculus);
    printf("\n Please Enter Your Marks in English : ");
    scanf("%d",&english);
    
    
    				  /* If Condition - Programming Marks - for GPA and Grade and Remarks */
    
    
    if(programming>=85)
    {
    strcpy(grade_programming,"A+"); //string copy needed
    gpa_programming=4.0;    //float, no string copy needed
    strcpy(grade_programming,"Exceptional"); //string copy needed
    }
    
    
    if(programming>=80&&programming<=84)
    {
    strcpy(grade_programming,"A");  //same as above
    gpa_programming=3.7;
    strcpy(remarks_programming,"Outstanding");
    }
    
    
    if(programming>=75&&programming<=79)
    {
    strcpy(grade_programming,"B+");
    gpa_programming=3.4;
    strcpy(remarks_programming,"Excellent");
    }
    
    
    if(programming>=70&&programming<=74)
    {
    strcpy(grade_programming,"B");;
    gpa_programming=3.0;
    strcpy(remarks_programming,"Very Good");
    }

  11. #26
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,681
    As Adak said, you have to do that AND to have enough space in your arrays.
    This
    Code:
    char grade_electronics[1];
    can have only one character!!!! And what about the null terminator of the strings ????????
    You need to have enough space to fit the string +1 for the null terminator.
    Actually what are you doing? You want to assign A+ to grade of programming or Exceptional??
    Decide which the max length your array may have, let's say 12, if you use Exceptional (11 letters + 1 for the null terminator), then
    you should declare the array like this
    Code:
    char grade_electronics[12];
    //Adak just 3 for grade programming won't make the work
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

  12. #27
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    I'm making the comments as I go, rather than reviewing the whole program first. Sort of a running commentary:

    First 200 lines or so:

    Code:
    #include<stdio.h>
    #include<string.h>
    #include<conio.h>
    int main(void)
    {
    
    					    /* Getting Inital Values */
    
    
    int english,electronics,programming,itc,calculus;
    int sum,roll;
    //char grade_total[];
    char grade_english[3];
    char grade_electronics[3];
    char grade_programming[3];
    char grade_itc[5];char grade_calculus[5];
    float gpa_english,gpa_electronics,gpa_programming,gpa_itc,gpa_calculus;
    float percentage;
    char name[20];
    //char remarks_total;
    char remarks_english[10],remarks_electronics[10],remarks_programming[10],remarks_itc[10],remarks_calculus[10];
    
    
    					    /* Getting User Personal Info */
    
    
    printf("\n Please Enter Your Name : ");
    scanf("%s",name);
    printf("\n Please Enter Your Roll Number : ");
    scanf("%d",&roll);
    
    					    /* Getting User Academic Record */
    
    
    printf("\n Please Enter Your Marks in Programming : ");
    scanf("%d",&programming);
    printf("\n Please Enter Your Marks in Electronics : ");
    scanf("%d",&electronics);
    printf("\n Please Enter Your Marks in I.T.C : ");
    scanf("%d",&itc);
    printf("\n Please Enter Your Marks in Calculus : ");
    scanf("%d",&calculus);
    printf("\n Please Enter Your Marks in English : ");
    scanf("%d",&english);
    
    
    				  /* If Condition - Programming Marks - for GPA and Grade and Remarks */
    
    
    if(programming>=85)
    {
    strcpy(grade_programming,"A+");
    gpa_programming=4.0;
    strcpy(grade_programming,"Exceptional");
    }
    
    
    if(programming>=80&&programming<=84)
    {
    strcpy(grade_programming,"A");
    gpa_programming=3.7;
    strcpy(remarks_programming,"Outstanding");
    }
    
    
    if(programming>=75&&programming<=79)
    {
    strcpy(grade_programming,"B+");
    gpa_programming=3.4;
    strcpy(remarks_programming,"Excellent");
    }
    
    
    if(programming>=70&&programming<=74)
    {
    strcpy(grade_programming,"B");;
    gpa_programming=3.0;
    strcpy(remarks_programming,"Very Good");
    }
    
    
    if(programming>=65&&programming<=69)
    {
    strcpy(grade_programming,"B-");
    gpa_programming=2.5;
    strcpy(remarks_programming,"Good");
    }
    
    
    if(programming>=60&&programming<=64)
    {
    strcpy(grade_programming,"C+");
    gpa_programming=2.0;
    strcpy(remarks_programming,"Average");
    }
    
    
    if(programming>=55&&programming<=59)
    {
    strcpy(grade_programming,"C");
    gpa_programming=1.5;
    strcpy(remarks_programming,"Satisfactory");
    }
    
    
    if(programming>=50&&programming<=54)
    {
    strcpy(grade_programming,"D");
    gpa_programming=1.0;
    strcpy(remarks_programming,"Pass");
    }
    
    
    if(programming<=49)
    {
    strcpy(grade_programming,"F");
    gpa_programming=0.0;
    strcpy(remarks_programming,"Fail");
    }
    
    
    				  /* If Condition - English Marks - for GPA and Grade and Remarks */
    
    if(english>=85)
    {
    strcpy(grade_english,"A");
    gpa_english=4.0;
    strcpy(remarks_english,"Exceptional");
    }
    
    
    if(english>=80&&english<=84)
    {
    strcpy(grade_english,"A");
    gpa_english=3.7;
    strcpy(remarks_english,"Outstanding");
    }
    
    
    if(english>=75&&english<=79)
    {
    strcpy(grade_english,"B+");
    gpa_english=3.4;
    strcpy(remarks_english,"Excellent");
    }
    
    
    if(english>=70&&english<=74)
    {
    strcpy(grade_english,"B");
    gpa_english=3.0;
    strcpy(remarks_english,"Very Good");
    }
    
    
    if(english>=65&&english<=69)
    {
    strcpy(grade_english,"B-");
    gpa_english=2.5;
    strcpy(remarks_english,"Good");
    }
    
    
    if(english>=60&&english<=64)
    {
    strcpy(grade_english,"C+");
    gpa_english=2.0;
    strcpy(remarks_english,"Average");
    }
    
    
    if(english>=55&&english<=59)
    {
    strcpy(grade_english,"C");
    gpa_english=1.5;
    strcpy(remarks_english,"Satisfactory");
    }
    
    
    if(english>=50&&english<=54)
    {
    strcpy(grade_english,"D");
    gpa_english=1.0;
    strcpy(remarks_english,"Pass");
    }
    
    
    if(english<=49)
    {
    strcpy(grade_english,"F");
    gpa_english=0.0;
    strcpy(remarks_english,"Fail");
    }
    
    
    
    
    				  /* If Condition - Electronics Marks - for GPA and Grade and Remarks */
    
    
    
    if(electronics>=85)
    {
    strcpy(grade_electronics,"A");
    gpa_electronics=4.0;
    strcpy(remarks_electronics,"Exceptional");
    }
    When do you have to turn this in, Raja?

  13. #28
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by rajatahirqaiser View Post
    means header should be


    Code:
    #include<stdio.h>
    #include<conio.h>
    #include<string.h>
    int main(void)
    {



    .................................................. ..................
    and In each i have to change from
    .................................................. .........


    Code:
    if(programming>=85)
    {
    grade_programming="A+";
    gpa_programming=4.0;
    grade_programming="Exceptional";
    }

    to






    Code:
    if(programming>=85)
    {
    strcpy(grade_programming,"A+");
    strcpy(gpa_programming,"4.0");         <======NO! Leave that one with the equal sign, it's a float!! 
    strcpy(grade_programming,"Exceptional");
    }
    NO! Leave the = sign in place, for all the floats! Just change the strings to use strcpy().

  14. #29
    Registered User
    Join Date
    Nov 2012
    Posts
    22
    Now my code after debugging is

    Code:
    #include<stdio.h>
    #include<string.h>
    #include<conio.h>
    int main(void)
    {
    clrscr();
    
    
    
    
    					    /* Getting Inital Values */
    
    
    
    
    int english,electronics,programming,itc,calculus;
    int sum,roll;
    //char grade_total[];
    char grade_english[3];
    char grade_electronics[3];
    char grade_programming[3];
    char grade_itc[3];char grade_calculus[3];
    float gpa_english,gpa_electronics,gpa_programming,gpa_itc,gpa_calculus;
    float percentage;
    char name[20];
    //char remarks_total;
    char remarks_english[10],remarks_electronics[10],remarks_programming[10],remarks_itc[10],remarks_calculus[10];
    
    
    
    
    					    /* Getting User Personal Info */
    
    
    
    
    printf("\n Please Enter Your Name : ");
    scanf("%d",name);
    printf("\n Please Enter Your Roll Number : ");
    scanf("%d",&roll);    
    printf("\n Please Enter Your Marks in Programming : ");
    scanf("%d",&programming);
    
    
                                  /* If Condition - Programming Marks - for GPA and Grade and Remarks */
    
    
    
    
    if(programming>=85)
    {
    strcpy(grade_programming,"A+");
    gpa_programming=4.0;
    strcpy(grade_programming,"Exceptional");
    }
    
    
    
    
    if(programming>=80&&programming<=84)
    {
    strcpy(grade_programming,"A");
    gpa_programming=3.7;
    strcpy(remarks_programming,"Outstanding");
    }
    
    
    
    
    if(programming>=75&&programming<=79)
    {
    strcpy(grade_programming,"B+");
    gpa_programming=3.4;
    strcpy(remarks_programming,"Excellent");
    }
    
    
    
    
    if(programming>=70&&programming<=74)
    {
    strcpy(grade_programming,"B");;
    gpa_programming=3.0;
    strcpy(remarks_programming,"Very Good");
    }
    
    
    
    
    if(programming>=65&&programming<=69)
    {
    strcpy(grade_programming,"B--");
    gpa_programming=2.5;
    strcpy(remarks_programming,"Good");
    }
    
    
    if(programming>=60&&programming<=64)
    {
    strcpy(grade_programming,"C+");
    gpa_programming=2.0;
    strcpy(remarks_programming,"Average");
    }
    
    
    if(programming>=55&&programming<=59)
    {
    strcpy(grade_programming,"C");
    gpa_programming=1.5;
    strcpy(remarks_programming,"Satisfactory");
    }
    
    
    if(programming>=50&&programming<=54)
    {
    strcpy(grade_programming,"D");
    gpa_programming=1.0;
    strcpy(remarks_programming,"Pass");
    }
    
    
    if(programming<=49)
    {
    strcpy(grade_programming,"F");
    gpa_programming=0.0;
    strcpy(remarks_programming,"Fail");
    }
    
    
    
    
    printf("\n Please Enter Your Marks in Electronics : ");
    scanf("%d",&electronics);
    
    
    
    
    				  
    
    
    				  /* If Condition - Electronics Marks - for GPA and Grade and Remarks */
    
    
    if(electronics>=85)
    {
    strcpy(grade_electronics,"A+");
    gpa_electronics=4.0;
    strcpy(grade_electronics,"Exceptional");
    }
    
    
    
    
    if(electronics>=80&&electronics<=84)
    {
    strcpy(grade_electronics,"A");
    gpa_electronics=3.7;
    strcpy(remarks_electronics,"Outstanding");
    }
    
    
    
    
    if(electronics>=75&&electronics<=79)
    {
    strcpy(grade_electronics,"B+");
    gpa_electronics=3.4;
    strcpy(remarks_electronics,"Excellent");
    }
    
    
    
    
    if(electronics>=70&&electronics<=74)
    {
    strcpy(grade_electronics,"B");;
    gpa_electronics=3.0;
    strcpy(remarks_electronics,"Very Good");
    }
    
    
    
    
    if(electronics>=65&&electronics<=69)
    {
    strcpy(grade_electronics,"B--");
    gpa_electronics=2.5;
    strcpy(remarks_electronics,"Good");
    }
    
    
    if(electronics>=60&&electronics<=64)
    {
    strcpy(grade_electronics,"C+");
    gpa_electronics=2.0;
    strcpy(remarks_electronics,"Average");
    }
    
    
    if(electronics>=55&&electronics<=59)
    {
    strcpy(grade_electronics,"C");
    gpa_electronics=1.5;
    strcpy(remarks_electronics,"Satisfactory");
    }
    
    
    if(electronics>=50&&electronics<=54)
    {
    strcpy(grade_electronics,"D");
    gpa_electronics=1.0;
    strcpy(remarks_electronics,"Pass");
    }
    
    
    if(electronics<=49)
    {
    strcpy(grade_electronics,"F");
    gpa_electronics=0.0;
    strcpy(remarks_electronics,"Fail");
    }
    
    
    printf("\n Please Enter Your Marks in I.T.C : ");
    scanf("%d",&itc);
    
    
                                 /* If Condition - I.T.C Marks - for GPA and Grade and Remarks */
    
    
    if(itc>=85)
    {
    strcpy(grade_itc,"A+");
    gpa_itc=4.0;
    strcpy(grade_itc,"Exceptional");
    }
    
    
    
    
    if(itc>=80&&itc<=84)
    {
    strcpy(grade_itc,"A");
    gpa_itc=3.7;
    strcpy(remarks_itc,"Outstanding");
    }
    
    
    
    
    if(itc>=75&&itc<=79)
    {
    strcpy(grade_itc,"B+");
    gpa_itc=3.4;
    strcpy(remarks_itc,"Excellent");
    }
    
    
    
    
    if(itc>=70&&itc<=74)
    {
    strcpy(grade_itc,"B");;
    gpa_itc=3.0;
    strcpy(remarks_itc,"Very Good");
    }
    
    
    
    
    if(itc>=65&&itc<=69)
    {
    strcpy(grade_itc,"B--");
    gpa_itc=2.5;
    strcpy(remarks_itc,"Good");
    }
    
    
    if(itc>=60&&itc<=64)
    {
    strcpy(grade_itc,"C+");
    gpa_itc=2.0;
    strcpy(remarks_itc,"Average");
    }
    
    
    if(itc>=55&&itc<=59)
    {
    strcpy(grade_itc,"C");
    gpa_itc=1.5;
    strcpy(remarks_itc,"Satisfactory");
    }
    
    
    if(itc>=50&&itc<=54)
    {
    strcpy(grade_itc,"D");
    gpa_itc=1.0;
    strcpy(remarks_itc,"Pass");
    }
    
    
    if(itc<=49)
    {
    strcpy(grade_itc,"F");
    gpa_itc=0.0;
    strcpy(remarks_itc,"Fail");
    }
    printf("\n Please Enter Your Marks in Calculus : ");
    scanf("%d",&calculus);
    
    
    
    
    				  
    
    
    
    
    				  /* If Condition - Calculus Marks - for GPA and Grade and Remarks */
    
    
    if(calculus>=85)
    {
    strcpy(grade_calculus,"A+");
    gpa_calculus=4.0;
    strcpy(grade_calculus,"Exceptional");
    }
    
    
    
    
    if(calculus>=80&&calculus<=84)
    {
    strcpy(grade_calculus,"A");
    gpa_calculus=3.7;
    strcpy(remarks_calculus,"Outstanding");
    }
    
    
    
    
    if(calculus>=75&&calculus<=79)
    {
    strcpy(grade_calculus,"B+");
    gpa_calculus=3.4;
    strcpy(remarks_calculus,"Excellent");
    }
    
    
    
    
    if(calculus>=70&&calculus<=74)
    {
    strcpy(grade_calculus,"B");;
    gpa_calculus=3.0;
    strcpy(remarks_calculus,"Very Good");
    }
    
    
    
    
    if(calculus>=65&&calculus<=69)
    {
    strcpy(grade_calculus,"B--");
    gpa_calculus=2.5;
    strcpy(remarks_calculus,"Good");
    }
    
    
    if(calculus>=60&&calculus<=64)
    {
    strcpy(grade_calculus,"C+");
    gpa_calculus=2.0;
    strcpy(remarks_calculus,"Average");
    }
    
    
    if(calculus>=55&&calculus<=59)
    {
    strcpy(grade_calculus,"C");
    gpa_calculus=1.5;
    strcpy(remarks_calculus,"Satisfactory");
    }
    
    
    if(calculus>=50&&calculus<=54)
    {
    strcpy(grade_calculus,"D");
    gpa_calculus=1.0;
    strcpy(remarks_calculus,"Pass");
    }
    
    
    if(calculus<=49)
    {
    strcpy(grade_calculus,"F");
    gpa_calculus=0.0;
    strcpy(remarks_calculus,"Fail");
    }
    
    
    
    
    printf("\n Please Enter Your Marks in English : ");
    scanf("%d",&english);
    
    
                                     /* If Condition - English Marks - for GPA and Grade and Remarks */
    
    
    if(english>=85)
    {
    strcpy(grade_english,"A+");
    gpa_english=4.0;
    strcpy(grade_english,"Exceptional");
    }
    
    
    
    
    if(english>=80&&english<=84)
    {
    strcpy(grade_english,"A");
    gpa_english=3.7;
    strcpy(remarks_english,"Outstanding");
    }
    
    
    
    
    if(english>=75&&english<=79)
    {
    strcpy(grade_english,"B+");
    gpa_english=3.4;
    strcpy(remarks_english,"Excellent");
    }
    
    
    
    
    if(english>=70&&english<=74)
    {
    strcpy(grade_english,"B");;
    gpa_english=3.0;
    strcpy(remarks_english,"Very Good");
    }
    
    
    
    
    if(english>=65&&english<=69)
    {
    strcpy(grade_english,"B--");
    gpa_english=2.5;
    strcpy(remarks_english,"Good");
    }
    
    
    if(english>=60&&english<=64)
    {
    strcpy(grade_english,"C+");
    gpa_english=2.0;
    strcpy(remarks_english,"Average");
    }
    
    
    if(english>=55&&english<=59)
    {
    strcpy(grade_english,"C");
    gpa_english=1.5;
    strcpy(remarks_english,"Satisfactory");
    }
    
    
    if(english>=50&&english<=54)
    {
    strcpy(grade_english,"D");
    gpa_english=1.0;
    strcpy(remarks_english,"Pass");
    }
    
    
    if(english<=49)
    {
    strcpy(grade_english,"F");
    gpa_english=0.0;
    strcpy(remarks_english,"Fail");
     }
    
    
    
    
    
    
    				  
    
    
    
    
    						 /* Finalizing the Conditions */
    
    
    sum=english+electronics+programming+itc+calculus;
    percentage=(sum*100)/500;
    
    
    gets(name);
    printf("\n Roll Number : %d ",roll);
    
    
    printf("\n English       %d      %f    %s     %s ",english,gpa_english,remarks_english,grade_english);
    printf("\n Electronics   %d      %f    %s     %s ",electronics,gpa_electronics,remarks_electronics,grade_electronics);
    printf("\n Programming   %d      %f    %s     %s ",programming,gpa_programming,remarks_programming,grade_programming);
    printf("\n ITC   %d      %f    %s     %s ",itc,gpa_itc,remarks_itc,grade_itc);
    printf("\n Calculus       %d      %f    %s     %s ",calculus,gpa_calculus,remarks_calculus,grade_calculus);
    
    
    printf("\n \n \t The Total Marks You got are %d and your Percentage is %f",sum,percentage);
    getch();
    
    
    }

    NO ERROR
    but prints all after asking name

    automatically !

  15. #30
    SAMARAS std10093's Avatar
    Join Date
    Jan 2011
    Location
    Nice, France
    Posts
    2,681
    Raja I told you to read the whole posts! If you to post number 4, you see that I said to use
    %s for strings in scanf !

    Glad you have no errors
    Code - functions and small libraries I use


    It’s 2014 and I still use printf() for debugging.


    "Programs must be written for people to read, and only incidentally for machines to execute. " —Harold Abelson

Page 2 of 3 FirstFirst 123 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Forum bug?
    By zacs7 in forum General Discussions
    Replies: 2
    Last Post: 11-04-2009, 11:19 AM
  2. How to Use This Forum
    By webmaster in forum Programming Book and Product Reviews
    Replies: 0
    Last Post: 04-18-2009, 07:16 PM
  3. General forum question - if in wrong forum...
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 05-14-2007, 05:00 AM
  4. Having a second forum pop-up
    By 7smurfs in forum C# Programming
    Replies: 0
    Last Post: 03-11-2005, 07:10 PM
  5. Replies: 7
    Last Post: 09-08-2002, 02:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21