Sunday 7 January 2018

Learn C language Part 31 Count Frequency of a Character in string





#include <stdio.h>

#include <conio.h>



main()

{



char c[50];

char d;

int i=0,sum=0;



printf("Enter your Name : ");

gets(c);

printf("\nEnter your Searching Character : ");

d=getchar();





while(c[i]!='\0')

{



if(c[i]==d)

{

sum=sum+1;

}

i++;



}





printf("\n\n%c is found %d times in string",d,sum);









}

Learn C language Part 30 Gets and Puts String Method in C





#include <stdio.h>

#include <conio.h>



main()

{



char name[50];

printf("Enter your Name: ");

gets(name); //read string...



printf("Your Name is : ");

puts(name); //print .....



}

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);







}

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 ...