chandu8893
chandu8893
Function in string
#include<stdio.h> #include<string.h> int main() { char s1[10]="Chandan"; printf("%ld\n",sizeof(s1)); char s2[10]="Mahato"; strcat(s1,s2); printf("%ld\n",sizeof(s1)); printf("%s\n",s1); return 0; } why here the size of s1 before concatinating and after conatinating is same . ?
4 replies
Help me out.
#include <stdio.h> int main() { char str[] = "%d %c"; char a[] = "CodeQuotient"; return 0; } 1.)printf(str, 0[a], 2[a + 3]) 2)printf(str, 2[a], 3[a + 2]); what will be the output of this question:
14 replies