Read and download free pdf of CBSE Class 12 Computer Science Library Functions Assignment. Get printable school Assignments for Class 12 Computer Science. Class 12 students should practise questions and answers given here for Library Functions Computer Science in Class 12 which will help them to strengthen their understanding of all important topics. Students should also download free pdf of Printable Worksheets for Class 12 Computer Science prepared as per the latest books and syllabus issued by NCERT, CBSE, KVS and do problems daily to score better marks in tests and examinations
Assignment for Class 12 Computer Science Library Functions
Class 12 Computer Science students should refer to the following printable assignment in Pdf for Library Functions in Class 12. This test paper with questions and answers for Class 12 Computer Science will be very useful for exams and help you to score good marks
Library Functions Class 12 Computer Science Assignment
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 Communication And Network Concepts Notes |
CBSE Class 12 Computer Science Library Functions Assignment
We hope you liked the above assignment for Library Functions which has been designed as per the latest syllabus for Class 12 Computer Science released by CBSE. Students of Class 12 should download and practice the above Assignments for Class 12 Computer Science regularly. We have provided all types of questions like MCQs, short answer questions, objective questions and long answer questions in the Class 12 Computer Science practice sheet in Pdf. All questions have been designed for Computer Science by looking into the pattern of problems asked in previous year examinations. You can download all Revision notes for Class 12 Computer Science also absolutely free of cost. Lot of MCQ questions for Class 12 Computer Science have also been given in the worksheets and assignments for regular use. All study material for Class 12 Computer Science students have been given on studiestoday. We have also provided lot of Worksheets for Class 12 Computer Science which you can use to further make your self stronger in Computer Science.
What are benefits of doing Assignment for CBSE Class 12 Computer Science Library Functions?
a. Score higher marks: Regular practice of Computer Science Class 12 Assignments for chapter Library Functions will help to improve understanding and help in solving exam questions correctly.
b. As per CBSE pattern: All questions given above follow the latest Class 12 Computer Science Sample Papers so that students can prepare as per latest exam pattern.
c. Understand different question types: These assignments include MCQ Questions for Class 12 Computer Science with answers relating to Library Functions, short answers, long answers, and also case studies.
d. Improve time management: Daily solving questions from Library Functions within a set time will improve your speed and accuracy.
e. Boost confidence: Practicing multiple assignments and Class 12 Computer Science mock tests for Library Functions reduces exam stress.
How to Solve CBSE Class 12 Computer Science Library Functions Assignment effectively?
a. Start with Class 12 NCERT and syllabus topics: Always read the chapter carefully before attempting Assignment questions for Class 12 Computer Science Library Functions.
b. Solve without checking answers: You should first attempt the assignment questions on Library Functions yourself and then compare with provided solutions.
c. Use Class 12 worksheets and revision notes: Refer to NCERT Class 12 Computer Science worksheets, sample papers, and mock tests for extra practice.
d. Revise tricky topics: Focus on difficult concepts by solving Class 12 Computer Science MCQ Test.
e. Maintain notebook: Note down mistakes in Library Functions assignment and read them in Revision notes for Class 12 Computer Science
How to practice CBSE Class 12 Computer Science Library Functions Assignment for best results?
a. Solve assignments daily: Regular practice of Library Functions questions will strengthen problem solving skills.
b.Use Class 12 study materials: Combine NCERT book for Class 12 Computer Science, mock tests, sample papers, and worksheets to get a complete preparation experience.
c. Set a timer: Practicing Class 12 Computer Science Library Functions assignment under timed conditions improves speed and accuracy.
You can download free Pdf assignments for CBSE Class 12 Computer Science Library Functions from StudiesToday.com
All topics given in Library Functions Computer Science Class 12 Book for the current academic year have been covered in the given assignment
No, all Printable Assignments for Library Functions Class 12 Computer Science have been given for free and can be downloaded in Pdf format
Latest syllabus issued for current academic year by CBSE has been used to design assignments for Library Functions Class 12
Yes, we have provided detailed answers for all questions given in assignments for Library Functions Class 12 Computer Science