Computer Programming C Laboratory: Standard Libraries and Header Files in C Programs

Demonstrates the use of some commonly used header files in C

Standard Libraries and Header Files in C Programs

Demonstrates the use of some commonly used header files in C.

#include <math.h>

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main()

{

char s1[20] = "12345";

char s2[10] = "Geeks";

char s3[10] = "VRBMUNI";

long int res;

//Find the value of 9^3 using a function in math.h library

Res =  pow(9, 3);

printf("Using math.h, ""The value is: %ld\n", res);

//Convert a string to long long int using a function in stdlib.h library

long int a=atol(s1);

printf("Using stdlib.h, the string");

printf(" to long int: %ld\n", a);

//Copy the string s3 into s2 using using a function in string.h library

strcpy(s2,s3);

printf("Using string.h, the strings" "s2 and s3:%s%s\n", s2,53);

return 0;

OUTPUT

Using math.h, The value is: 729

Using stdlib.h, the string to long int: 12345

Using string.h, the strings s2 and s3: VRBMUNI VRBMUNI

Computer Programming C Laboratory: Standard Libraries and Header Files in C Programs : Tag: C Programming : - Demonstrates the use of some commonly used header files in C


Computer Programming C Laboratory: Standard Libraries and Header Files in C Programs



Under Subject


Computer Programming C Laboratory

CS25C01 1st Semester EEE, ECE, CSE, CSE(CY), AIDS, IT practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation



Related Subjects


English Essentials I

EN25C01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation


தமிழர் மரபு - Heritage of Tamils

UC25H01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation


Applied Calculus

MA25C01 Maths 1 M1 - 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation


Applied Physics I

PH25C01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation


Applied Chemistry I

CY25C01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation


Makerspace

ME25C04 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation


Computer Programming C

CS25C01 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation


Computer Programming Python

CS25C02 1st Semester | 2025 Regulation | 1st Semester 2025 Regulation


Fundamentals of Electrical and Electronics Engineering

EE25C03 1st Semester EEE Depart | 2025 Regulation | 1st Semester 2025 Regulation


Introduction to Mechanical Engineering

ME25C03 1st Semester Mechanical Dept | 2025 Regulation | 1st Semester 2025 Regulation


Introduction to Civil Engineering

CE25C01 1st Semester Civil, Agri Departments | 2025 Regulation | 1st Semester 2025 Regulation


Essentials of Computing

CS25C03 1st Semester - AIDS, CSE, CSE(CY), IT Department | 2025 Regulation | 1st Semester 2025 Regulation


Applied Physics I Laboratory

PH25C01 1st Semester practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation


Applied Chemistry I Laboratory

CY25C01 1st Semester practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation


Computer Programming C Laboratory

CS25C01 1st Semester EEE, ECE, CSE, CSE(CY), AIDS, IT practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation


Computer Programming Python Laboratory

CS25C02 1st Semester practical Laboratory Manual | 2025 Regulation | 1st Semester Laboratory 2025 Regulation


Engineering Drawing

ME25C01 EEE, Mech, Agri, EEE Depts | 2025 Regulation | 2nd Semester 2025 Regulation


Basic Electronics and Electrical Engineering

EE25C04 1st Semester ECE Dept | 2025 Regulation | 1st Semester 2025 Regulation


Essentials of Computing - Laboratory

CS25C03 1st Semester AIDS, CSE, CSE(CY), IT Depts | practical Laboratory Manual | 2025 Regulation | 1st Semester 2025 Regulation