C Lab programs Archive

Write a C program to convert a string to a long integer

Approach-1: We use strtol() function to covert string to long integer. It is belongs to stdlib.h header file. The prototype of function is long int strtol(const char *str, char **endptr, int base) It converts the …

Courses Enquiry Form