0 votes 0 votes What is the output of below code? #include<stdio.h> Int check(int); Int main() { Int k=35,z; z=check(k); printf("z=%d\n",z); return 0; } int check(int m) { int m; if(m>40) return (!m++); else return (!++m); } Programming in C programming-in-c + – saumya mishra asked May 21, 2018 • retagged May 22, 2018 by Subarna Das saumya mishra 1.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes so i think answer is 0 eyeamgj answered May 21, 2018 eyeamgj comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments saumya mishra commented May 21, 2018 reply Follow Share Yes 0 votes 0 votes eyeamgj commented May 21, 2018 reply Follow Share no it is giving error after compiling please check..... 0 votes 0 votes Souradeep Sen Gupta commented Jun 4, 2018 reply Follow Share Yes, m is declared twice. I think when check(35) is called m=35; is done. And again m is declared. This time no initialization. And as we know that it is a local variable to that scope, it has to get initialized, hence the error. I think according to my limited knowledge this is what's happening 0 votes 0 votes Please log in or register to add a comment.