+ 1
#include<stdio.h> struct node { char c[5]; }; void main() { struct node n[]={"ABC","TECH"}; printf("%c",n[1].c[1]); }
Gove me output and explain it please
1 Resposta
0
You declared a structure called 'node' that can store an array of 5 characters.
In the main function you create an array of structs of type node, and you initialize the first element with the string "ABC" and the 2nd element with the string "TECH".
You then print the 2nd character of the string stored in the 2nd element of the array 'n'.
struct node n[0] = "ABC"
struct node n[1] = "TECH"
|
c[1]
So the output is: E