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 / dipti

No its in valid as a static variable cannot be declared as extern.
The whole and entire purpose of static is to declare that a variable is private to the source file that it is declared in.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are bit fields portable?

792


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1599


how can I convert a string to a number?

688


What is a macro, and explain how do you use it?

707


If fflush wont work, what can I use to flush input?

727






Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?

862


What are the 4 types of functions?

665


What is difference between structure and union in c?

632


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1552


Explain the term printf() and scanf() used in c language?

692


What is the difference between variable declaration and variable definition in c?

654


What are the difference between a free-standing and a hosted environment?

854


Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?

762


How can I remove the leading spaces from a string?

719


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1617