Share your repls and programming experiences

← Back to all posts
gabriellasheb (0)

Write a program that uses pointers. The program takes as input a country name and displays
its capital. First you should store a list of countries with their capitals as strings pointed by
pointers. The user should input the name of a country and the program should display its
capital on the screen. Use the following data in your program:
Country : Capital :
France Paris
Italy Rome
Canada Ottawa
United States Washington
England London
India New Delhi
Japan Tokyo