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 / sumit mondal
yes of course it is valid.
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
What is sizeof c?
Is there sort function in c?
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!+....
What is the use of static variable in c?
Is c is a procedural language?
What are the __date__ and __time__ preprocessor commands?
How can I list all of the predefined identifiers?
When should you use a type cast?
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
How can I ensure that integer arithmetic doesnt overflow?
What is a pointer in c?
How many types of arrays are there in c?
Explain what is the benefit of using an enum rather than a #define constant?
What is static identifier?
What are the ways to a null pointer can use in c programming language?