Answers for "structure basics"

C
0

structure basics

#include <stdio.h>

struct Country
{
    char name[50];
    char capital[50];
};

int main()
{
    struct Country c1;
    scanf("%s\n%s", c1.name, c1.capital);

    printf("The country name is %s and it's capital is %s",c1.name,c1.capital);
    return 0;
}
Posted by: Guest on July-11-2021

Code answers related to "C"

Browse Popular Code Answers by Language