but it is defined inside main????u mean to say for varibale to be gloabal it
must be defines outsyd all fxns??

On Wed, Aug 31, 2011 at 8:35 PM, Ashima . <ashima.b...@gmail.com> wrote:

> u hv just declared the variable and not defined it.So no memory is
> allocated to var. so u l get the undefined reference error.
> either remove extern or define new local variable int var =10;
> Ashima
> M.Sc.(Tech)Information Systems
> 4th year
> BITS Pilani
> Rajasthan
>
>
>
>
> On Wed, Aug 31, 2011 at 7:56 AM, Rajesh Kumar <testalgori...@gmail.com>wrote:
>
>> What we do to remove error??
>>  #include<stdio.h>
>> extern int var;
>> main()
>> {
>>  var=10;
>>  return 0;
>> }
>>
>> Regards
>> Rajesh Kumar
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to