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
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
What is the process of writing the null pointer?
When should I declare a function?
What is malloc return c?
How to set file pointer to beginning c?
What is modifier & how many types of modifiers available in c?
Is c is a middle level language?
What is the purpose of sprintf?
Tell us two differences between new () and malloc ()?
When was c language developed?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
What is the Purpose of 'extern' keyword in a function declaration?
What is "Hungarian Notation"?
Write a C program in Fibonacci series.
Are there any problems with performing mathematical operations on different variable types?