Read and download the CBSE Class 12 Computer Science Library Functions Assignment for the 2025-26 academic session. We have provided comprehensive Class 12 Computer Science school assignments that have important solved questions and answers for Library Functions. These resources have been carefuly prepared by expert teachers as per the latest NCERT, CBSE, and KVS syllabus guidelines.
Solved Assignment for Class 12 Computer Science Library Functions
Practicing these Class 12 Computer Science problems daily is must to improve your conceptual understanding and score better marks in school examinations. These printable assignments are a perfect assessment tool for Library Functions, covering both basic and advanced level questions to help you get more marks in exams.
Library Functions Class 12 Solved Questions and Answers
Fill in the blanks
Question. _________ is a self-contained block of statements that perform a specific task.
Answer: Function
Question. Functions can be broadly classified broadly in ____________ categories.
Answer: two
Question. __________ function converts the character type in argument to lower case
Answer: tolower()
Question. Library functions that carry out standard input/output operations are included in __________ header file
Answer: stdio.h
Question. All library functions available are grouped under __________ file.
Answer: header
Short answer type Questions
Question. Functions can be classified into how many types?
Answer: Functions can be classified mainly into two categories:
Library or Built-in functions: Those functions, which are in-built or predefined in the C language, are called standard or library functions. All these functions are organized in header files (also called library files). To use any library function, we must include the corresponding header file (in which it is defined) in our program. For example: clrscr( ), printf(), scanf(), sqrt(), strcpy() etc. are the predefined functions.
User defined functions: Those functions, which are defined by the user, are called user defined functions. User can define his own functions to fulfil his requirements. The function main() is an example of user defined function. Its body is defined by user.
Question. Explain library function?
Answer: Those functions, which are in-built or pre-defined in the C language, are called standard or library functions. All these functions are organized in header files (also called library files). To use any library function, we must include the corresponding header file (in which it is defined) in our program. For example: clrscr( ), printf(), scanf(), sqrt(), strcpy() etc. are the predefined functions. The input output functions scanf( ) and printf( ) are defined in the stdio.h header file. So, we have to include this file in our program if we want to use these functions. Similarly, string functions strlen( ), strcpy( ), strcat( ), strcmp( ), strupr( ), strlwr( ) etc. are defined in the string.h header file. So, we must include string.h header file to use these string functions in our program.
Question. Which files are included at the beginning of program and why?
Answer: Header files are included at the beginning of program. Extension of these files is .h. Library functions are logical grouped into header files. To use any library function, we have to include corresponding header files in which they are defined. That is why these header files are included at the beginning of the program. Some of the commonly used header files are: stdio.h, conio.h, math.h, string.h etc.
Question. Explain difference between user-defined and library function?
Answer: The difference between user-defined and library functions are given below:
Library or Built-in functions: Those functions, which are in-built or pre-defined in the C language, are called standard or library functions. All these functions are organized in header files (also called library files). To use any library function, we must include the corresponding header file (in which it is defined) in our program. For example: clrscr(), printf(), scanf(), sqrt(), strcpy() etc. are the predefined functions.
User defined functions: Those functions, which are defined by the user, are called user defined functions. User can define his own functions to fulfil his requirements. The function main() is an example of user defined function. Its body is defined by user.
Question. Give the names of library functions included in string.h file?
Answer: all the string handling functions has been defined in the string.h header file. Some of the commonly used string functions are given below:
• strlen() function
• strcmp() function
• strcat() function
• strcpy() function
• strrev) function
• strupr() function
• strlwr() function
Question. Give the names of any four header files used in C?
Answer: Commonly used header files used in C along with their library functions are given below:
i. Header file – stdio.h: Full form of stdio is Standard Input Output. This header file contains the functions that are used for Standard Input and Output operations. For example: printf(), scanf() functions
ii. Header file – ctype.h: This header file contains functions that are used to perform operations on character data.
For example: tolower(), toupper(), islower(), isupper() etc.
iii. Header file – string.h: This header file contains functions that are used to perform operations on string data. For example: strlen(), strupr(), strlwr(), strcat(), strcmp() etc.
iv. Header file – math.h: This header file contains functions that are used to perform mathematical operations. For example: sqrt(), pow(), sin(), cos() etc.
Question. Explain strcpy function with example?
Answer: Function strcpy stands for string copy. This function is used to copy a string value into string variable. Following code shows how to use this function. This function is present in the string.h header file. Therefore, to use this function, we have to include the string.h header file in our program.
strcpy(str, “Punjab”);
It copy/store the string value “Punjab” into the string variable str.
Question. Write a program in C using tolower function?
Answer: The functions tolower() is used to convert the character value into the lower case. Consider the following
example program:
#include<stdio,h>
#include<stdio,h>
#include<stdio,h>
void main()
{
char value;
value=tolower(‘A’);
printf(“%c”,value); //shows a
}
Question. Write a program in C using strcat function?
Answer: The function strcat is used to concatenate (combine) two string values. Consider the following example
program:
#include<stdio,h>
#include<stdio,h>
void main()
{
char value1[20]=”Hello”;
char value2[20]=”Students”
strcat(value1,value2);
printf(“%s”,value1); //shows Hello Students
}
Long answer Type Questions
Question. What are the main advantages of functions?
Answer: (see Chapter 3rd)
Question. Describe library functions? Explain any four in detail.
Answer: Those functions, which are in-built or pre-defined in the C language, are called standard or library functions. All these functions are organized in header files (also called library files). To use any library function, we must include the corresponding header file (in which it is defined) in our program. For example: clrscr( ), printf(), scanf(), sqrt(), strcpy() etc. are the predefined functions. Four library functions are explained below:
Function strcpy():Function strcpy stands for string copy. This function is used to copy a string value into string variable. This function is present in the string.h header file. Therefore, to use this function, we have to include the string.h header file in our program. Following code shows how to use this function. strcpy(str, “Punjab”); //copy Punjab into str
Function strlen():Function strlen() stands for string length. This function is used to count the total number of characters in the given string. This function is present in the string.h header file. Following code shows how to use this function: strlen(“punjab”); //returns 6
Function sqrt (): Sqrt stands for square rootFunction. It is a mathematical function. It returns the square root of the gven value. This function is present in the math.h header file. Following code shows how to use this function: sqrt(36); //returns 6.0 Function toupper(): This function is used to convert the given character value to upper case. Thisfunction is present in the ctype.h header file. Following code shows how to use this function: toupper(‘a’); //returns A
Question. Write a program to calculate square root of a number using library function.
Answer: The function sqrt() is used to calculate the square root of number. This function is present in the math.h header
file. Following program shows how to use this function:
#include<stdio,h>
#include<stdio,h>
void main() {
float result;
result=sqrt(9);
printf(“%f”,result); //shows 3.000000
}
Question. Write a Program which accept a Character and convert it into upper case.
Answer: The function toupper() is used to convert a character into upper case. This function is present in the ctype.h
headerfile. Following program shows how to use this function:
#include<stdio,h>
#include<stdio,h>
void main()
{
char value;
value=toupper(‘a’);
printf(“%c”,value); //shows A
Question. Write a program to calculate the length of following string: “satik”
Answer: The function strlen() is used to calculate the length of a string. This function is present in the string.h header file.
Following program shows how to use this function:
#include<stdio,h>
#include<stdio,h>
void main() {
int length;
length=strlen(“Satik”);
printf(“%d”,length); //shows 5
}
Question. Write a program to find the sum of following series: H = x2 + x4 + x6 + ………………+xn
Answer:
| CBSE Class 12 Computer Science Boolean Logic Concepts |
| CBSE Class 12 Computer Science Computer network Assignment |
| CBSE Class 12 Computer Science Communication And Network Concepts Notes |
| CBSE Class 12 Computer Science Concept of Networking Assignment |
| CBSE Class 12 Computer Science Constructors And Destructors Concepts |
| CBSE Class 12 Computer Science Data File Handling In C++ Concepts |
| CBSE Class 12 Computer Science Data Structures Assignment |
| CBSE Class 12 Computer Science Data Structures Concepts |
| CBSE Class 12 Computer Science Data Visualization Using Pyplot Assignment |
| CBSE Class 12 Computer Science Database And SQL Concepts |
| CBSE Class 12 Computer Science Database Concepts Assignment |
| CBSE Class 12 Computer Science File Handling in Python Assignment |
| CBSE Class 12 Computer Science Functions In Python Assignment |
| CBSE Class 12 Computer Science Idea Of Efficiency Assignment |
| CBSE Class 12 Computer Science Inheritance Concepts |
| CBSE Class 12 Computer Science Interface Python with SQL Assignment |
| CBSE Class 12 Computer Science Introduction and Basics of Computers Assignment |
| CBSE Class 12 Computer Science Library Functions Assignment |
| CBSE Class 12 Computer Science Object Oriented Programming Concepts |
| CBSE Class 12 Computer Science Pointers Concepts |
| CBSE Class 12 Computer Science Programming In C++ Concepts |
| CBSE Class 12 Computer Science Revision Of The Basics Of Python Assignment |
| CBSE Class 12 Computer Science Society Law And Ethics Assignment |
| CBSE Class 12 Computer Science Structured Query Language SQL Assignment |
| CBSE Class 12 Computer Science User Defined Functions Assignment |
| CBSE Class 12 Computer Science Window Movie Maker I Assignment |
| CBSE Class 12 Computer Science Window Movie Maker II Assignment |
Important Practice Resources for Class 12 Computer Science
CBSE Class 12 Computer Science Library Functions Assignment
Access the latest Library Functions assignments designed as per the current CBSE syllabus for Class 12. We have included all question types, including MCQs, short answer questions, and long-form problems relating to Library Functions. You can easily download these assignments in PDF format for free. Our expert teachers have carefully looked at previous year exam patterns and have made sure that these questions help you prepare properly for your upcoming school tests.
Benefits of solving Assignments for Library Functions
Practicing these Class 12 Computer Science assignments has many advantages for you:
- Better Exam Scores: Regular practice will help you to understand Library Functions properly and you will be able to answer exam questions correctly.
- Latest Exam Pattern: All questions are aligned as per the latest CBSE sample papers and marking schemes.
- Huge Variety of Questions: These Library Functions sets include Case Studies, objective questions, and various descriptive problems with answers.
- Time Management: Solving these Library Functions test papers daily will improve your speed and accuracy.
How to solve Computer Science Library Functions Assignments effectively?
- Read the Chapter First: Start with the NCERT book for Class 12 Computer Science before attempting the assignment.
- Self-Assessment: Try solving the Library Functions questions by yourself and then check the solutions provided by us.
- Use Supporting Material: Refer to our Revision Notes and Class 12 worksheets if you get stuck on any topic.
- Track Mistakes: Maintain a notebook for tricky concepts and revise them using our online MCQ tests.
Best Practices for Class 12 Computer Science Preparation
For the best results, solve one assignment for Library Functions on daily basis. Using a timer while practicing will further improve your problem-solving skills and prepare you for the actual CBSE exam.
You can download free PDF assignments for Class 12 Computer Science Chapter Library Functions from StudiesToday.com. These practice sheets have been updated for the 2025-26 session covering all concepts from latest NCERT textbook.
Yes, our teachers have given solutions for all questions in the Class 12 Computer Science Chapter Library Functions assignments. This will help you to understand step-by-step methodology to get full marks in school tests and exams.
Yes. These assignments are designed as per the latest CBSE syllabus for 2026. We have included huge variety of question formats such as MCQs, Case-study based questions and important diagram-based problems found in Chapter Library Functions.
Practicing topicw wise assignments will help Class 12 students understand every sub-topic of Chapter Library Functions. Daily practice will improve speed, accuracy and answering competency-based questions.
Yes, all printable assignments for Class 12 Computer Science Chapter Library Functions are available for free download in mobile-friendly PDF format.