I'm self-learning C from a book and currently studying pointers and arrays.
#include <stdio.h>
#include <string.h>
#define LINES 5
void main()
{
char* str[LINES];
str[0] = "hola";
str[1] = "mundo";
*(*(str + 0) + 1) = 'Z';
printf("%c", *(*(str + 0) + 1));
}
Here I want to replace 'o' of "hola" with 'Z' but it's not working. if i remove: ((str + 0) + 1) = 'Z'; I get 'o' in the output but how do i replace the character of the string?