Sunday, 7 January 2018

Learn C language Part 29 Read String From Use Input using while loop





#include <stdio.h>

#include <conio.h>



main()

{



char name[50];

char c;

int i=0;

printf("Enter your Name: ");



while(c!='\n')

{



c=getchar();

name[i]=c;

i++;



}



name[i]='\0';





printf("name : %s",name);







}

No comments:

Post a Comment

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...