presented BY : DURGESH KKHANDEKAR 1st semester

Slides:



Advertisements
Similar presentations
Chapter Five Functions
Advertisements

1 ICS103 Programming in C Lecture 5: Introduction to Functions.
Fungsi Risanuri Hidayat, Ir., M.Sc.. Functions C usually consist of two things: instance variables and functions. All C programs consist of one or more.
This presentation includes custom animations. To view the animations, you must view the presentation in Slide Show mode and activeX controls must be allowed.
Functions Quick Review What is a Function? A module of code that performs a specific job. Examples: Function that determines the maximum of two numbers.
TK1913-C Programming1 TK1913-C Programming 1 C Library Functions C provides a collection of library functions for programmers If these library functions.
CS1061 C Programming Lecture 10: Macros, Casting and Intro. to Standard Library A. O’Riordan, 2004.
Functions in C. Function Terminology Identifier scope Function declaration, definition, and use Parameters and arguments Parameter order, number, and.
 Introduction Introduction  Types of Function Types of Function  Library function Library function  User defined function User defined function 
Computer Science 210 Computer Organization Introduction to C.
Functions Lecture 4 – Section 2: 9/21/05 Section 4: 9/22/05.
1 ICS103 Programming in C Lecture 7: Introduction to Functions.
UniMAP Sem2-10/11 DKT121: Fundamental of Computer Programming1 Functions (1)
Introduction As programmers, we don’t want to have to implement functions for every possible task we encounter. The Standard C library contains functions.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 5.3Math Library Functions Math library functions –perform.
UniMAP SemI-09/10EKT120: Computer Programming1 Week 5 – Functions (1)
Function. Outline Intro. Functions Examples of Functions Prototypes of a Functions Local and Global Variables.
Functions: Part 2 of /11/10: Lecture 16 CMSC 104, Section 0101 John Y. Park 1.
Lecture-3 Functions and Recursion. C Preprocessor Includes header files like stdio.h Expands macros defined Handles conditional compilations PreprocessorProcessor.
1 TOPICS TO DISCUSS : FUNCTIONS TYPES OF FUNCTIONS HEADER FILES PRESENTED BY : AVISHEK MAJUMDAR(837837) GUNJAN AGARWAL(856587) SATYAPRIYA DEY(856624)
Week 1 Lecture 2SE1SA51 Introducing C SE1SA5 Sue Walmsley.
Unary, Binary, logical Operations, Explicit type conversion Lecture 6 Instructor: Haya Sammaneh.
Introduction to C Programming I Subject: T0016 – ALGORITHM AND PROGRAMMING Year: 2013.
Week 4 – Functions Coding Functions. Purpose of Coding Functions A function is written to perform a well-defined task; rather than having all logic in.
UMBC CMSC 104 – Section 01, Fall 2016
EKT120: Computer Programming
CSE101-Lec#5-6 Operators.
Computer Science 210 Computer Organization
Mathematical Functions
BILASPUR UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE AND APPLICATION
Computer Programming Techniques Semester 1, 1998
TMF1414 Introduction to Programming
Functions, Part 2 of 2 Topics Functions That Return a Value
CS 108 Computing Fundamentals Notes for Thursday, September 14, 2017
Module 4 Functions – function definition and function prototype.
CSC113: Computer Programming (Theory = 03, Lab = 01)
PGT 106: Computer Programming
Week 5 – Functions (1) EKT120: Computer Programming.
Functions Department of Computer Science-BGU יום רביעי 12 ספטמבר 2018.
Programming Fundamentals Lecture #7 Functions
Deitel- C:How to Program (5ed)
EKT120: Computer Programming
Exercises on String Operations
Functions in C Mrs. Chitra M. Gaikwad.
Functions.
2008/11/10: Lecture 16 CMSC 104, Section 0101 John Y. Park
Computer Science 210 Computer Organization
Chapter 5 - Functions Outline 5.1 Introduction
Scope, Parameter Passing, Storage Specifiers
Functions Declarations CSCI 230
Functions Chapter 3 of the text Motivation:
Lec 7.
مباني كامپيوتر و برنامه سازي
Functions.
بنام خدا زبان برنامه نویسی C (21814( Lecture 4 Chapter 5
Functions, Part 2 of 3 Topics Functions That Return a Value
Lecture4.
Assignment Operators Topics Increment and Decrement Operators
Assignment Operators Topics Increment and Decrement Operators
Introduction to Problem Solving and Programming
Functions Extra Examples.
Functions Department of Computer Science-BGU יום שישי 26 אפריל 2019.
Functions Imran Rashid CTO at ManiWeber Technologies.
Characters and Strings Functions
Assignment Operators Topics Increment and Decrement Operators
Functions, Part 2 of 3 Topics Functions That Return a Value
Functions, Part 2 of 42 Topics Functions That Return a Value
Functions, Part 2 of 3 Topics Functions That Return a Value
Functions that return a value
Functions in C Math Library Functions Functions Function Definitions
Presentation transcript:

presented BY : DURGESH KKHANDEKAR 1st semester BILASPUR UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE & APPLICATION TOPIC: LIBRARY FUNCTION GUIDED BY : JINTENDRA SIR presented BY : DURGESH KKHANDEKAR 1st semester

C Standard library function or simply C Library function are inbuilt function in C programming. Function prototype and Data defination of these function are written in their respective header file For example. If you want to use printf() function, the header file <stdio.h> should be included #include<stdio.h> Int main() { /*if you write printf() statement without including header file, this program will show error Printf (“catch me if you can”); }

There is at least one function in C i There is at least one function in C i.e, the main() function (which is also a library function). This program is called at program starts. There are many library function available in C programing to help the programmer to write a good eficient program. Suppose, you want to find the square root of a number. You can write your own piece code to find to square root but, this process is time consuming and the code you have written may not be most efficient process find square root But, in C programing you can find the square root by just using sqrt() function which is defined under header file “math.h”

Use of Library function to find square root #include <stdio.h> #include ><math.h> Int main() { float num,root; Printf(“Enter a number to find square root”); Scanf(“%f”,&num); Root =sqrt(num); /* computer the square root of num and stores in root*/ Printf(“Square root of %.2f=%.2f”,num,root); Return 0; }

Important notes C Header files <math.h> <ctype.h> <stdio.h> <stdlib.h> <string.h> <time.h>