Thread: to assign a double and output it

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jul 2022
    Posts
    78

    to assign a double and output it

    hi, so at the moment i have this code

    Code:
        char cint2[10] = "xyz";
        char cint3[10] = "lol";
    
    
        char my_string[] = {""};
        char my_string2[] = {""};
    
    
        printf("\n%s", cint2);
    
    
    
    
        strcpy (cint2,my_string);
        strcpy (cint3,my_string2);
    
    
    
    
    
    
        double double1[2][2] = {{my_string,my_string2,my_string},{my_string2,my_string,my_string2}};
    
        printf("\n%f", double1[2][2]);
    it outputs: 0.000000
    anyone know the correct syntax?
    Last edited by WaterSerpentM; 10-18-2023 at 10:59 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. cant get a double type output ??
    By hummingdev in forum C Programming
    Replies: 3
    Last Post: 04-01-2014, 04:13 PM
  2. double/float output is inaccurate.
    By slee8251 in forum C Programming
    Replies: 8
    Last Post: 03-13-2012, 01:27 AM
  3. Comma instead of period in Double output
    By trillykins in forum C Programming
    Replies: 1
    Last Post: 11-19-2010, 09:29 AM
  4. Double output!
    By Spurnout in forum C++ Programming
    Replies: 3
    Last Post: 11-02-2002, 03:35 AM
  5. Floating points and Double output
    By bman1176 in forum C++ Programming
    Replies: 2
    Last Post: 10-11-2001, 12:24 AM

Tags for this Thread