1 votes 1 votes #include <stdio.h> int main() { static a=10; static b=15.56; printf("%d %d",a,b); } Output -> 10 15 Why without data type information , this program is running? Programming in C scoping-rule + – Learner_jai asked Mar 13, 2017 Learner_jai 427 views answer comment Share Follow See 1 comment See all 1 1 comment reply Pavan Kumar Munnam commented Mar 13, 2017 reply Follow Share it is taking the implicit int rule , if you donot declare anything it will take int 2 votes 2 votes Please log in or register to add a comment.
1 votes 1 votes "A variable declared without an explicit type name is assumed to be of type int." akash.dinkar12 answered Mar 13, 2017 akash.dinkar12 comment Share Follow See all 3 Comments See all 3 3 Comments reply Shubhanshu commented Sep 21, 2017 reply Follow Share @akash.dinkar12 but when I am running it is showing error. prog.cpp: In function ‘int main()’: prog.cpp:5:8: error: ‘a’ does not name a type static a=10; ^ prog.cpp:7:8: error: ‘b’ does not name a type static b=15.56; ^ prog.cpp:9:16: error: ‘a’ was not declared in this scope printf("%d %d",a,b); prog.cpp:9:18: error: ‘b’ was not declared in this scope printf("%d %d",a,b); 0 votes 0 votes saxena0612 commented Sep 21, 2017 reply Follow Share @ Shubhanshu In c not in c++. 2 votes 2 votes Shubhanshu commented Sep 21, 2017 reply Follow Share thanks @saxena0612, @akash.dinkar12!!!!!!! 2 votes 2 votes Please log in or register to add a comment.