String To Integer In C Program Tamil


#include<stdio.h>
#include<conio.h>
void main()
{
  int num=0,i;
  char *a;
  clrscr();
  printf("\n             www.tutorjoes.com\n\n");
  printf("\nEnter the String :");
  gets(a);
  for(i=0;a[i]!='\0';i++)
  {
    if(a[i]>=48&&a[i]<=57)
    {
       num=(num*10)+(a[i]-48);
    }
  }
  printf("\nNumber : %d",num);
  getch();
}

Login To Download Source Code

Leave a Comment:

Login To Comment

List Of Programs


Goto Examples

Operators

Looping

Number Conversion

Pattern Design

Arrays

Matrix Examples

Sorting Examples

String Function

Change Case

String In C

Maths Functions

User Defined Functions

Recursive Functions

Pointer

Structure

File Concept

Calender Programming