Saturday, November 7, 2020

two-dimentional array

 #include <stdio.h>

#include <cs50.h>


int main(void){

string names[4]; 

names[0]="EMMA";

names[1]="RODRIGO";

names[2]="BRIAN";

names[3]="DAVID";

printf("%s\n", names[0]);

printf("%c%c%c%c", names[0][0], names[0][1], names[0][2], names[0][3]);

}




source: harvard, cs50



No comments:

Post a Comment