how can we Declare a variable in c without defining it.
Answer Posted / manoj
By using EXTRN.
Example:
File 1:
int GlobalVariable; // implicit definition
void SomeFunction(); // function prototype
(declaration)
int main() {
GlobalVariable = 1;
SomeFunction();
return 0;
}
File 2:
extern int GlobalVariable; // explicit declaration
void SomeFunction() { // function header (definition)
++GlobalVariable;
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
Why c is a mother language?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
Write a program to implement queue.
What is meant by int main ()?
what is the diffrenet bettwen HTTP and internet protocol
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.
What is sizeof array?
What is fflush() function?
What does s c mean on snapchat?
How can you check to see whether a symbol is defined?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
Can you explain the four storage classes in C?
What is adt in c programming?
Can you subtract pointers from each other? Why would you?