in one file global variable int i; is declared as static. In
another file it is extern int i=100;
Is this valid ?
Answers were Sorted based on User's Feedback
Answer / 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 |
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
What does 3 periods mean in texting?
write a program to print data of 5 five students with structures?
how to compare two strings without using strcmp() function??
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What are the 4 data types?
What is define directive?
write a c program for greatest of three numbers without using if statment
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 are header files and what are its uses in C programming?
What is true about the following C Functions a.Need not return any value b.Should always return an integer c.Should always return a float d.Should always return more than one value.
what is a function prototype?