Thread: arrays

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2021
    Posts
    30

    arrays

    I have no idea how these output to these numbers and I don't know what they're for, anyone help?

    Code:
    #include <stdio.h>
    
    
    int main() {
       /* my first program in C */
       printf("Hello, World! \n\n");
       printf("hello world 2 \n\n");
       
       
       int int1 = 1;
       int int2 = 2;
       int int3 = (int1 + int2);
       
       printf("1 + 2 = %d \n\n",int3);
       
       double array1 [10] = {2.0, 4.0, 6.0};
       printf ("%d \n\n",array1);
       
       double array2 [25] = {5.0, 2.0, 9.0};
       printf ("%d \n\n",array2);     
       
       return 0;
    }
    Last edited by oods1; 01-24-2021 at 05:36 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 02-06-2014, 02:39 PM
  2. Replies: 9
    Last Post: 07-11-2013, 10:57 PM
  3. Replies: 16
    Last Post: 01-01-2008, 04:07 PM
  4. Passing pointers to arrays of char arrays
    By bobthebullet990 in forum C Programming
    Replies: 5
    Last Post: 03-31-2006, 05:31 AM
  5. Replies: 2
    Last Post: 02-23-2004, 06:34 AM

Tags for this Thread