Hello
I am trying learn the use of switch statement in c programming. I wrote following program.
Why does it print only "name" I want to print all one by one. should I create loop for (i=0, i<2; i++);Code:#include <stdio.h> int main () { int i = 0; switch(i) { case 1: printf("name"); break; case 2: printf("age"); break; case 3: printf("address"); break; } return 0; }