Function Computer Science Project Class 10th

Table of Contents


The function is a self contained block of statements which performs a coherent task of same kind.

C program does not execute the functions directly. It is required to invoke or call that function. When a function is called any program then program control goes to the function body. Therefore, it is possible to call function whenever we want to process that functions statements.

Library Functions :

Library Functions are present in the C library and they are predefined. To use library function we have to include corresponding header file. For example, to use input output functions like printf () and scanf (), we have to include stdio.h.

Standard Input and Output Functions :

The standard input and output functions are defined in stdio.h header file. To include these functions in our program, we should use # include<stdio.h> statement in the beginning of the program. Some function are printf(), putchar (), scanf(), and getchar ().

getchar () :

The getchar () function is used to read a character from the keyboard.

syntax : char ch;

. ch = getchar ();

Putchar () :

The Putchar () function is used to print a character on the screen.

syntax : int putchar (char ch);

Program :

# include <stdio.h>

void main ()


char ch;

printf (“Enter a characte :”);

ch= getchar ();

putchar (ch);


Mathematical functions :

Mathematical functions are the functions defined in the Haider file math.h.

log ()

The log () function returns the natural logarithm of a number of the type double it successful.

sintex : double log (double X);

pow ()

This function calculates a value that is x raised to the power y.i.e.x power y.

syntax : double row ( double x, double y);

sqrt ()

This function is used to find the square root of a number.

syntax : float sqrt (float num);

exp ()

This function is used to find the exponential value of a number.

syntax : float exp (float num);

sin () This function is used to find out the sine value of an angle.

syntax : double sin (double x);

Program :

# include <studio.h>

# include <math.h>

void main ()


int a = 30;

printf (“% d % It %, abs (a), log (a), sqrt (a)”);


Character functions :

Character functions are the functions that operate on character. These functions are define in ctype.h header file.

isupper () :

This function is used to check the given character is in upper case or not.

sintex : int is upper (char ch);

islower () :

This function is used to to check the given character is in lower case or not.

sintex : int is lower (char ch);

toupper () :

This function is used to convert lowercase character into upper case character.

syntax : char toupper

tolower () :

This function is used to convert uppercase character into lowercase character.

syntax : char tolower (char ch);

isdigit () :

This function is used to check the given character is a digit or not.

syntax : int isdigit (int ch);

Program :

# include <stdio.h>

# include <ctype.h>

void main ()


char ch;

printf (” Enter a character :”);

ch = getchar ();

if ( isupper (ch))

printf (“character is upper case letter”);


Conclusion :

This project provides as the knowledge of library function and their uses.


Ques.1 What is the default return type of a user defined function?

Ans. void.

Ques.2 Which function is necessary in a valid C program?

Ans. main () function is necessary in a C program.

Ques.3 Which function call it self?

Ans. Recursive functions repeatedly call it self.

Ques.4 Which function executes first in C program?

Ans. main () function.

Read also :

C programming (Array) computer project Class 10

Computer Science Project Work-4 Class 10th

Class 10th Computer Science Project Work-3

दिल्ली में प्रधानमंत्री मोदी के खिलाफ आपत्तिजनक पोस्टर, 100 FIR दर्ज

दिल्ली पुलिस ने प्रधानमंत्री नरेंद्र मोदी के खिलाफ आपत्तिजनक पोस्टर लगाने के आरोप में 6 लोगों को गिरफ्तार कर लिया है। इस संबंध में 100 FIR दर्ज की हैं।

SDM के नेतृत्व में अल्ट्रासाउंड केंद्रों की होगी जांच और 1 अप्रैल से बेटी बचाओ बेटी पढ़ाओ अभियान होगा शुरू

बस्ती जिले के सभी 119 पंजीकृत अल्ट्रासाउंड केंद्रों की जांच की जायेगी। तहसील के एसडीएम जांच संबंधित टीम का नेतृत्व करेंगे। सीएमओ को डीएम ने आदेश दिया है कि टीम में एक डॉक्टर और एक जिला स्तरीय अधिकारी शामिल किए जाएंगे। उन्होंने सीडीओ, एसडीएम डीडीओ, सीआरओ, पीडी व अन्य वरिष्ठ अधिकारियों को टीम में स्थान देने के लिए कहा है।
Khushboo Gupta
Hii I'm Khushboo Gupta and I'm from UP ,I'm Article writer and write articles on new technology, news, Business, Economy etc. It is amazing for me to share my knowledge through my content to help curious minds.

कोई जवाब दें

कृपया अपनी टिप्पणी दर्ज करें!
कृपया अपना नाम यहाँ दर्ज करें


Most Popular