1// c char str[](single string)
2array[0]
3// c char str[] (multiple string)
4array[0][0]
5// c++ std::stirng s;
6s[0]
1#include <stdio.h>
2#include<string.h>
3
4int main(void)
5{
6 char c[100];
7 scanf("%s",c);
8 /*strlen(c) gives total length of string . string index starts from 0
9 last index of character is strlen(c)-1*/
10 int l = strlen(c)-1;
11 printf("%c %c",c[0],c[l]);
12 return 0;
13}
1#include <stdio.h>
2
3int main(void){
4 char b[5];
5 scanf("%s",&c);
6 printf("Simple answer %c",b[0:4])
7}