#include <stdio.h>
int main() {
unsigned short i = 0;
scanf("%u", &i);
printf("%u", i);
}
/*
int main() {
unsigned short i = 0, j = 0;
scanf("%u", &i);
printf("%u", i);
}
*/
hey try the above prog, cc short.c -o short
then ./short
enter a number, you ll end up in seg fault.
you can comment the first n try d second main(), it works fine.
what is wrong? is it wid my code? or is it wid d compiler? or is it somewhr else?
Thanx for checkin on it.!