search
Log In
1 vote
141 views

extern int num = 10;  // is it valid ??

in Programming 141 views
0

i think ...output must be ..

0 50  ..?

0
my question is different ???
0

@hs_yadav  thanks bro , what do you think here  extern int num = 10 ; will throw error

1
Complication error: cannot initialise extern variable.
1

hmm  @thepeeyoosh   yup i thinks it will throw error thanks 

Please log in or register to answer this question.

Related questions

0 votes
1 answer
1
285 views asked Nov 20, 2018 in Programming Na462 285 views
2 votes
1 answer
2
202 views
#include <stdio.h> int main() { int a=10; extern int a; return 0; } Why this gives compilation error? Extern is just a declaration.So why it is giving error on compilation?
asked Nov 23, 2017 in Programming rahul sharma 5 202 views
3 votes
1 answer
3
1.8k views
extern int var; int main(void) { var = 10; // why it is not considered as definition in prog return 0; } Why this is creating error saying (var is not defined).But as per rule -"by externing a variable we can use the variables anywhere in the program provided we know the declaration of them and the variable is defined somewhere."?
asked Jun 11, 2017 in Programming Shubhanshu 1.8k views
2 votes
2 answers
4
400 views
extern int i; int i = 10; i = 5; int main() { printf("%d", i); return 0; } The output for the above code is _______
asked Jan 16, 2018 in Algorithms targate2018 400 views
...