in one file global variable int i; is declared as static. In
another file it is extern int i=100;
Is this valid ?

Answer Posted / vadivel t

No. it is not valid,

Bcos we can not initialise a variable with an extern key
word.ie.,

The statement extern int i = 100; is wrong.

Is This Answer Correct ?    14 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What's the difference between constant char *p and char * constant p?

657


Is linux written in c?

601


What is the difference between class and object in c?

583


why return type of main is not necessary in linux

1706


What the advantages of using Unions?

673






how to find anagram without using string functions using only loops in c programming

2718


the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....

22232


How does struct work in c?

611


Does c have an equivalent to pascals with statement?

574


Do array subscripts always start with zero?

786


What is the process of writing the null pointer?

607


Why is event driven programming or procedural programming, better within specific scenario?

1955


Who invented b language?

916


What are the types of pointers in c?

530


Explain the use of 'auto' keyword

679