c check first character of string code example
Example 1: c check first character of string
#include <stdio.h>
int main(void){
char b[5];
scanf("%s",&c);
printf("Simple answer %c",b[0:4])
}
Example 2: c check first character of string
#include <stdio.h>
int main(void){
char b[5];
scanf("%s",&c);
printf("Simple answer %c",b[0:4])
}
Example 3: c check first character of string
array[0]
array[0][0]
s[0]
Example 4: how to print the first character of a string in c
#include <stdio.h>
#include<string.h>
int main(void)
{
char c[100];
scanf("%s",c);
int l = strlen(c)-1;
printf("%c %c",c[0],c[l]);
return 0;
}