Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Questions by sdpshaw
0
votes
2
answers
1
output?
#define int char main(){ int i=66; printf("%d",sizeof(i)); }
#define int charmain(){int i=66;printf("%d",sizeof(i));}
673
views
asked
Oct 2, 2015
Programming in C
programming
programming-in-c
+
–
2
votes
1
answer
2
What will be the output?
#include <stdio.h> char str1[100]; char *fun(char str[]) { static int i = 0; if (*str) { fun(str+1); str1[i] = *str; i++; } return str1; } int main() { char str[] = "GATE CS 2015 Mock Test"; printf(" ... kcoM 5102 SC ETAG C)Nothing is printed on screen D)Segmentation Fault i think answer should be option C.But the answer given as B.please explation how.
#include <stdio.h char str1[100]; char *fun(char str[]) { static int i = 0; if (*str) { fun(str+1); str1[i] = *str; i++; } return str1; } int main() { char str[] = "GATE ...
1.8k
views
asked
Sep 27, 2015
Programming in C
programming
programming-in-c
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register