Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
  • Please log in to reply
No replies to this topic

#1 enggdrcaos

enggdrcaos

    CC Lurker

  • New Member
  • Pip
  • 8 posts
  • Programming Language:C, Java, C++, Objective-C

Posted 02 October 2012 - 06:18 AM

In this tutorial we have explained one of the features which is available in both C/C++ know as functions

This tutorial explains the following:

1. What is initialization?
2. How to initialize a single variable.
3. How to initialize an array of variable.

A brief simple tutorial can be found here:



#include <iostream>
#include<stdio.h>
using namespace std;

main()
{
int arr[5]={1,2,3,4,5};

cout<<"Elements of array";
for(int i=0;i<5;i++)
{
	 cout<<endl<<arr[i];
}//end for
}//end main

  • 0





Also tagged with one or more of these keywords: c variable initialization, variable, variable initialization, c++ initialization, c initialization, assign value to variable, variable value, start variable, what is initialization?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download