-
What will be the output of the following C code?
#include <stdio.h>
void main()
{
static double s;
int s;
printf("s is %d", s);
}
-
- s is 0
- Compilation Error
- Runtime Error
- Garbage value
- None of these
Correct Option: B
Compilation Error
main.c: In function ‘main’:
main.c:5:13: error: conflicting types for ‘s’
int s;
^
main.c:4:23: note: previous declaration of ‘s’ was here
static double s;