Thread: what is the meaing of this declaration line..

  1. #1
    Banned
    Join Date
    Oct 2008
    Posts
    1,535

    what is the meaing of this declaration line..

    Code:
    int arr[]={3,2,5,1,7,4,8,6},i;
    its a part of this code
    Code:
    void main(){
    	int arr[]={3,2,5,1,7,4,8,6},i;
    	f1(arr,8);
    	for(i=0; i<8; i++)
    		printf(“%2d”,arr[i]);
    }

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    You are declaring an array of ints which is initialized to what is inside the braces, and you are also declaring an integer named "i".

  3. #3
    Banned
    Join Date
    Oct 2008
    Posts
    1,535
    ahhh thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. adding line numbers and concatenating a filename
    By durrty in forum C Programming
    Replies: 25
    Last Post: 06-28-2008, 03:36 AM
  2. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  3. Trouble replacing line of file
    By Rpog in forum C Programming
    Replies: 4
    Last Post: 04-19-2004, 10:22 AM
  4. please help me
    By insane in forum Game Programming
    Replies: 8
    Last Post: 05-12-2003, 12:40 AM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM