/*Exercise-3:
a). Write a C program to convert to a string to a long integer.*/
#include<stdio.h>
#include<stdlib.h>
main()
{
int val;
char strn1[] = "12546";
val = atoi(strn1);
printf("String value = %s\n", strn1);
printf("Integer value = %d\n", val);
char strn2[] = "sai";
val = atoi(strn2);
printf("String value = %s\n",strn2);
printf("Integer value = %d\n", val);
}