chandu8893
CPSComputer Programming - Seneca Polytechnic College
•Created by chandu8893 on 5/18/2023 in #ask-a-question
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
CPSComputer Programming - Seneca Polytechnic College
•Created by chandu8893 on 5/13/2023 in #ask-a-question
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