In below program, what would you put in place of "?" to print "tax"?
#include <stdio.h>
int main()
[
char arr[] = "Deltax";
printf("%s", ?);
return 0;
Answers
Answered by
18
#include <stdio.h>
int main()
[
char arr[] = "Deltax";
printf("%s", income);
return 0;
Answered by
10
char[] will come in place of "?".
Explanation:
- Tax is a sub part of the array deltax.
- In order to get the tax from it, we should slice it.
- If we are ready to slice it ,we should mention three terms in it. First where we should start the slice, second where should we stop the slice, third is the increment.
- The first letter will start from 0.So "t" will come in place of 3, "x" will come in place of 5.We should slice with the increment 1.
Similar questions