Array , Structure and Basic Algorithms covers key concepts like arrays, strings, structures, and algorithms. Arrays allow storing a collection of related data using a common name. Strings are arrays of characters that end with a null terminator. Structures group together different data types into one type for structured data. Algorithms specify the steps to solve problems and their complexity classifies efficiency.
This document discusses handling of character strings in C programming. It covers declaring and initializing string variables as character arrays, reading strings from the terminal using scanf() and gets(), writing strings to the screen using printf() and puts(), performing arithmetic operations and comparisons on characters, concatenating strings, and commonly used string handling functions like strcpy(), strcat(), and strcmp().
This document provides an introduction to strings in C programming, including defining strings as character arrays, initializing strings, inputting and outputting strings, and pointers and strings. It also covers common string library functions like strlen(), strcpy(), strcat(), strcmp(), and strrev(). Finally, it includes examples of basic string programs demonstrating the use of these functions.
This document discusses handling character strings in C. It covers:
1. How strings are stored in memory as ASCII codes appended with a null terminator.
2. Common string operations like reading, comparing, concatenating and copying strings.
3. How to initialize, declare, read and write strings.
4. Useful string handling functions like strlen(), strcpy(), strcat(), strcmp() etc to perform various operations on strings.
This document discusses strings in C programming. It defines strings as arrays of characters terminated with a null character. It describes four methods of initializing strings: assigning a string literal with or without size, assigning characters individually with size, and assigning characters individually without size. It also covers string functions like strlen(), strcpy(), strcat(), and strcmp() to get the length, copy, concatenate, and compare strings. Finally, it discusses string arrays as two-dimensional character arrays where each string is terminated with a null character. An example program is provided to print an array of strings.
The document discusses strings in C including how to declare, initialize, input, output, and manipulate strings using standard library functions as well as how to manage arrays of strings. It provides examples of declaring and initializing strings, using scanf and gets to input strings, common string manipulation functions like strlen and strcpy, and demonstrates how to work with arrays of strings such as storing and sorting a list of names.
At the end of this lecture students should be able to;
Define the declaration C strings.
Compare fixed length and variable length string.
Apply strings for functions.
Define string handling functions.
Apply taught concepts for writing programs.
Strings are arrays of characters that are null-terminated. They can be manipulated using functions like strlen(), strcpy(), strcat(), and strcmp(). The document discusses initializing and reading strings, passing strings to functions, and using string handling functions to perform operations like copying, concatenating, comparing, and reversing strings. It also introduces arrays of strings as 2D character arrays for storing multiple strings. Examples are provided to read and sort names stored as an array of strings.
This document discusses strings in C programming. It defines strings as arrays of characters terminated by a null character. Strings must be declared as character arrays, specifying the array size. Common string functions like strcpy(), strcat(), strcmp(), and strlen() are described as well as how to initialize, copy, concatenate, compare and get the length of strings. The document provides examples of declaring, initializing and using strings in C code.
This document discusses strings in C programming. It defines strings as arrays of characters terminated by a null character. Strings must be declared as character arrays, specifying the array size. Common string functions like strcpy(), strcat(), strcmp(), and strlen() are described as well as how to initialize, copy, concatenate, compare and find the length of strings. The document provides examples of declaring, initializing and using strings in C code.
This document discusses strings in C programming. It defines strings as arrays of characters terminated by a null character. Strings must be declared as character arrays, specifying the array size. Common string functions like strcpy(), strcat(), strcmp(), and strlen() are described along with examples of how to use each function to copy, concatenate, compare, and find the length of strings. The document provides details on initializing strings, rules for declaring strings, and examples of string operations in C code.
This document provides information about strings in C++. It defines a string as a collection of characters within double quotes. Strings are stored as character arrays terminated by a null character. The document discusses declaring and initializing strings, inputting strings from the user, and functions for manipulating strings like strcat(), strcmp(), and memcpy(). It also covers arrays of strings and comparing, concatenating, copying and other operations on strings.
Strings are arrays of characters that are null-terminated. They can be manipulated using functions like strlen(), strcpy(), strcat(), and strcmp(). The document discusses initializing and reading strings, passing strings to functions, and using string handling functions to perform operations like copying, concatenating, comparing, and reversing strings. It also describes arrays of strings, which are 2D character arrays used to store multiple strings. Examples are provided to demonstrate reading and sorting arrays of strings.
Strings in C programming can be represented as arrays of characters terminated by a null character. A string is initialized by enclosing the characters within double quotes. Functions like strcpy(), strcat(), strcmp(), strlen() etc in string.h header file can perform operations on strings like copying, concatenating, comparing and finding length.
Strings in C programming can be represented as arrays of characters terminated by a null character. A string is initialized by enclosing the characters within double quotes. Functions like strcpy(), strcat(), strcmp(), strlen() etc in string.h header file can perform operations on strings like copying, concatenating, comparing and finding length.
A pointer is a variable that stores the address of another variable. Pointers allow a variable to indirectly access and modify the value of another variable. Pointers contain the address of the variable they point to. Common string operations like finding the length, comparing, copying and concatenating strings can be performed using standard library functions like strlen(), strcmp(), strcpy(), and strcat(). These functions make string handling easier compared to writing custom code.
This document discusses handling of character strings in C. It explains that a string is a sequence of characters stored in memory as ASCII codes appended with a null terminator. It describes common string operations in C like reading, displaying, concatenating, comparing and extracting substrings. It also discusses functions like strlen(), strcat(), strcmp(), strcpy() for performing various operations on strings.
This document provides an outline and overview of functions for handling characters and strings in C from several standard libraries. It discusses fundamentals of characters and strings, the character handling library ctype.h, string conversion functions in stdlib.h, I/O functions in stdio.h, and string processing functions in string.h, including searching, comparing, tokenizing and memory functions. The goal is to introduce techniques for text processing using these standard libraries.
1) A string is a one-dimensional array of characters terminated by a null character. Strings are declared using char arrays or string literals.
2) There are two ways to declare and initialize strings in C: using a char array and specifying the size, or using a string literal which automatically inserts a null terminator.
3) Common string functions include strlen() to return the length, strcpy() to copy one string to another, strcat() to concatenate strings, and strcmp() to compare two strings.
The document discusses strings in C programming. It defines strings as finite sequences of characters that can be implemented as arrays of bytes or characters. It describes common string operations like searching, sorting, trimming, insertion, and deletion. It also lists various string manipulation functions in C like strcat, strcpy, strlen, and their applications in areas like text editing, search engines, and computational biology.
This document provides an overview of string operations in C including:
- How strings are stored in memory with a null terminator
- Input and output of strings using scanf and printf
- Common string library functions like strcpy, strcat, and strlen
- Examples of justifying and manipulating strings
An array is a collection of similar data types stored in contiguous memory locations. Arrays in C can store primitive data types like int, char, float, etc. Elements of an array are accessed using indexes and they are stored sequentially in memory. Strings in C are arrays of characters terminated by a null character. Common functions to manipulate strings include strlen(), strcpy(), strcat(), strcmp(), strrev(), strlwr(), and strupr().
Strings are arrays of characters that are null-terminated. They can be manipulated using functions like strlen(), strcpy(), strcat(), and strcmp(). The document discusses initializing and reading strings, passing strings to functions, and using string handling functions to perform operations like copying, concatenating, comparing, and reversing strings. It also introduces arrays of strings as 2D character arrays for storing multiple strings. Examples are provided to read and sort names stored as an array of strings.
This document discusses strings in C programming. It defines strings as arrays of characters terminated by a null character. Strings must be declared as character arrays, specifying the array size. Common string functions like strcpy(), strcat(), strcmp(), and strlen() are described as well as how to initialize, copy, concatenate, compare and get the length of strings. The document provides examples of declaring, initializing and using strings in C code.
This document discusses strings in C programming. It defines strings as arrays of characters terminated by a null character. Strings must be declared as character arrays, specifying the array size. Common string functions like strcpy(), strcat(), strcmp(), and strlen() are described as well as how to initialize, copy, concatenate, compare and find the length of strings. The document provides examples of declaring, initializing and using strings in C code.
This document discusses strings in C programming. It defines strings as arrays of characters terminated by a null character. Strings must be declared as character arrays, specifying the array size. Common string functions like strcpy(), strcat(), strcmp(), and strlen() are described along with examples of how to use each function to copy, concatenate, compare, and find the length of strings. The document provides details on initializing strings, rules for declaring strings, and examples of string operations in C code.
This document provides information about strings in C++. It defines a string as a collection of characters within double quotes. Strings are stored as character arrays terminated by a null character. The document discusses declaring and initializing strings, inputting strings from the user, and functions for manipulating strings like strcat(), strcmp(), and memcpy(). It also covers arrays of strings and comparing, concatenating, copying and other operations on strings.
Strings are arrays of characters that are null-terminated. They can be manipulated using functions like strlen(), strcpy(), strcat(), and strcmp(). The document discusses initializing and reading strings, passing strings to functions, and using string handling functions to perform operations like copying, concatenating, comparing, and reversing strings. It also describes arrays of strings, which are 2D character arrays used to store multiple strings. Examples are provided to demonstrate reading and sorting arrays of strings.
Strings in C programming can be represented as arrays of characters terminated by a null character. A string is initialized by enclosing the characters within double quotes. Functions like strcpy(), strcat(), strcmp(), strlen() etc in string.h header file can perform operations on strings like copying, concatenating, comparing and finding length.
Strings in C programming can be represented as arrays of characters terminated by a null character. A string is initialized by enclosing the characters within double quotes. Functions like strcpy(), strcat(), strcmp(), strlen() etc in string.h header file can perform operations on strings like copying, concatenating, comparing and finding length.
A pointer is a variable that stores the address of another variable. Pointers allow a variable to indirectly access and modify the value of another variable. Pointers contain the address of the variable they point to. Common string operations like finding the length, comparing, copying and concatenating strings can be performed using standard library functions like strlen(), strcmp(), strcpy(), and strcat(). These functions make string handling easier compared to writing custom code.
This document discusses handling of character strings in C. It explains that a string is a sequence of characters stored in memory as ASCII codes appended with a null terminator. It describes common string operations in C like reading, displaying, concatenating, comparing and extracting substrings. It also discusses functions like strlen(), strcat(), strcmp(), strcpy() for performing various operations on strings.
This document provides an outline and overview of functions for handling characters and strings in C from several standard libraries. It discusses fundamentals of characters and strings, the character handling library ctype.h, string conversion functions in stdlib.h, I/O functions in stdio.h, and string processing functions in string.h, including searching, comparing, tokenizing and memory functions. The goal is to introduce techniques for text processing using these standard libraries.
1) A string is a one-dimensional array of characters terminated by a null character. Strings are declared using char arrays or string literals.
2) There are two ways to declare and initialize strings in C: using a char array and specifying the size, or using a string literal which automatically inserts a null terminator.
3) Common string functions include strlen() to return the length, strcpy() to copy one string to another, strcat() to concatenate strings, and strcmp() to compare two strings.
The document discusses strings in C programming. It defines strings as finite sequences of characters that can be implemented as arrays of bytes or characters. It describes common string operations like searching, sorting, trimming, insertion, and deletion. It also lists various string manipulation functions in C like strcat, strcpy, strlen, and their applications in areas like text editing, search engines, and computational biology.
This document provides an overview of string operations in C including:
- How strings are stored in memory with a null terminator
- Input and output of strings using scanf and printf
- Common string library functions like strcpy, strcat, and strlen
- Examples of justifying and manipulating strings
An array is a collection of similar data types stored in contiguous memory locations. Arrays in C can store primitive data types like int, char, float, etc. Elements of an array are accessed using indexes and they are stored sequentially in memory. Strings in C are arrays of characters terminated by a null character. Common functions to manipulate strings include strlen(), strcpy(), strcat(), strcmp(), strrev(), strlwr(), and strupr().
Mechanical fasteners hold machine or structural parts together and come in many forms. They are classified as either detachable or non-detachable. Detachable fasteners include threaded and non-threaded types. Threaded fasteners can be externally or internally threaded, while non-threaded types include pins, clips, and snaps. Proper fastener selection depends on factors like strength, security, cost, and ease of installation. Common threaded fasteners are screws, bolts, and nuts, which vary in size, shape, and application. Proper terminology and specifications ensure fasteners are correctly identified and applied.
This document discusses mechanical fasteners. It defines fasteners as mechanical elements that hold two or more machine or structural parts together. Fasteners are classified as detachable or non-detachable. Threaded and non-threaded fasteners are types of detachable fasteners. Common threaded fasteners include bolts, screws, and nuts. The document provides details on threaded fastener terminology, types of threads, thread manufacturing, and considerations for selecting an appropriate fastener.
Inheritance allows a derived class to inherit attributes and behaviors from a base class. A derived class inherits all public and protected members of the base class. Inheritance establishes an "is-a" relationship between classes. Polymorphism allows derived classes to override virtual functions from the base class and have them called dynamically at runtime based on the actual object type. Abstract base classes define pure virtual functions that derived classes must implement. Multiple inheritance allows a class to inherit from more than one base class.
This document provides an introduction to the components of a computer system. It discusses the central processing unit (CPU), which includes the control unit and arithmetic logic unit (ALU). It also covers main memory types like random access memory (RAM) and read-only memory (ROM). The document introduces other hardware components like input devices, output devices, and secondary storage. It provides an overview of how these components work together in a basic computer system.
This document provides an introduction to the basic components of a computer system, including:
- Hardware components like the central processing unit (CPU), memory, storage devices, and input/output devices. The CPU contains an arithmetic logical unit (ALU) and control unit to process data flow.
- Software programs and operating systems that run on computers.
- The functions of input devices like keyboards and mice to send data to the computer for processing, and output devices like monitors and printers that display or print the processed data.
- An overview of how the control unit manages the other components by reading and decoding instructions to perform operations and coordinate data and control flows within the computer.
This presentation was provided by Bill Kasdorf of Kasdorf & Associates LLC and Publishing Technology Partners, during the fifth session of the NISO training series "Accessibility Essentials." Session Five: A Standards Seminar, was held May 1, 2025.
Real GitHub Copilot Exam Dumps for SuccessMark Soia
Download updated GitHub Copilot exam dumps to boost your certification success. Get real exam questions and verified answers for guaranteed performance
Title: A Quick and Illustrated Guide to APA Style Referencing (7th Edition)
This visual and beginner-friendly guide simplifies the APA referencing style (7th edition) for academic writing. Designed especially for commerce students and research beginners, it includes:
✅ Real examples from original research papers
✅ Color-coded diagrams for clarity
✅ Key rules for in-text citation and reference list formatting
✅ Free citation tools like Mendeley & Zotero explained
Whether you're writing a college assignment, dissertation, or academic article, this guide will help you cite your sources correctly, confidently, and consistent.
Created by: Prof. Ishika Ghosh,
Faculty.
📩 For queries or feedback: [email protected]
K12 Tableau Tuesday - Algebra Equity and Access in Atlanta Public Schoolsdogden2
Algebra 1 is often described as a “gateway” class, a pivotal moment that can shape the rest of a student’s K–12 education. Early access is key: successfully completing Algebra 1 in middle school allows students to complete advanced math and science coursework in high school, which research shows lead to higher wages and lower rates of unemployment in adulthood.
Learn how The Atlanta Public Schools is using their data to create a more equitable enrollment in middle school Algebra classes.
How to Create A Todo List In Todo of Odoo 18Celine George
In this slide, we’ll discuss on how to create a Todo List In Todo of Odoo 18. Odoo 18’s Todo module provides a simple yet powerful way to create and manage your to-do lists, ensuring that no task is overlooked.
*Metamorphosis* is a biological process where an animal undergoes a dramatic transformation from a juvenile or larval stage to a adult stage, often involving significant changes in form and structure. This process is commonly seen in insects, amphibians, and some other animals.
"Basics of Heterocyclic Compounds and Their Naming Rules"rupalinirmalbpharm
This video is about heterocyclic compounds, which are chemical compounds with rings that include atoms like nitrogen, oxygen, or sulfur along with carbon. It covers:
Introduction – What heterocyclic compounds are.
Prefix for heteroatom – How to name the different non-carbon atoms in the ring.
Suffix for heterocyclic compounds – How to finish the name depending on the ring size and type.
Nomenclature rules – Simple rules for naming these compounds the right way.
Common rings – Examples of popular heterocyclic compounds used in real life.
What makes space feel generous, and how architecture address this generosity in terms of atmosphere, metrics, and the implications of its scale? This edition of #Untagged explores these and other questions in its presentation of the 2024 edition of the Master in Collective Housing. The Master of Architecture in Collective Housing, MCH, is a postgraduate full-time international professional program of advanced architecture design in collective housing presented by Universidad Politécnica of Madrid (UPM) and Swiss Federal Institute of Technology (ETH).
Yearbook MCH 2024. Master in Advanced Studies in Collective Housing UPM - ETH
APM event hosted by the Midlands Network on 30 April 2025.
Speaker: Sacha Hind, Senior Programme Manager, Network Rail
With fierce competition in today’s job market, candidates need a lot more than a good CV and interview skills to stand out from the crowd.
Based on her own experience of progressing to a senior project role and leading a team of 35 project professionals, Sacha shared not just how to land that dream role, but how to be successful in it and most importantly, how to enjoy it!
Sacha included her top tips for aspiring leaders – the things you really need to know but people rarely tell you!
We also celebrated our Midlands Regional Network Awards 2025, and presenting the award for Midlands Student of the Year 2025.
This session provided the opportunity for personal reflection on areas attendees are currently focussing on in order to be successful versus what really makes a difference.
Sacha answered some common questions about what it takes to thrive at a senior level in a fast-paced project environment: Do I need a degree? How do I balance work with family and life outside of work? How do I get leadership experience before I become a line manager?
The session was full of practical takeaways and the audience also had the opportunity to get their questions answered on the evening with a live Q&A session.
Attendees hopefully came away feeling more confident, motivated and empowered to progress their careers
Geography Sem II Unit 1C Correlation of Geography with other school subjectsProfDrShaikhImran
The correlation of school subjects refers to the interconnectedness and mutual reinforcement between different academic disciplines. This concept highlights how knowledge and skills in one subject can support, enhance, or overlap with learning in another. Recognizing these correlations helps in creating a more holistic and meaningful educational experience.
How to manage Multiple Warehouses for multiple floors in odoo point of saleCeline George
The need for multiple warehouses and effective inventory management is crucial for companies aiming to optimize their operations, enhance customer satisfaction, and maintain a competitive edge.
How to Manage Purchase Alternatives in Odoo 18Celine George
Managing purchase alternatives is crucial for ensuring a smooth and cost-effective procurement process. Odoo 18 provides robust tools to handle alternative vendors and products, enabling businesses to maintain flexibility and mitigate supply chain disruptions.
A measles outbreak originating in West Texas has been linked to confirmed cases in New Mexico, with additional cases reported in Oklahoma and Kansas. The current case count is 817 from Texas, New Mexico, Oklahoma, and Kansas. 97 individuals have required hospitalization, and 3 deaths, 2 children in Texas and one adult in New Mexico. These fatalities mark the first measles-related deaths in the United States since 2015 and the first pediatric measles death since 2003.
The YSPH Virtual Medical Operations Center Briefs (VMOC) were created as a service-learning project by faculty and graduate students at the Yale School of Public Health in response to the 2010 Haiti Earthquake. Each year, the VMOC Briefs are produced by students enrolled in Environmental Health Science Course 581 - Public Health Emergencies: Disaster Planning and Response. These briefs compile diverse information sources – including status reports, maps, news articles, and web content– into a single, easily digestible document that can be widely shared and used interactively. Key features of this report include:
- Comprehensive Overview: Provides situation updates, maps, relevant news, and web resources.
- Accessibility: Designed for easy reading, wide distribution, and interactive use.
- Collaboration: The “unlocked" format enables other responders to share, copy, and adapt seamlessly. The students learn by doing, quickly discovering how and where to find critical information and presenting it in an easily understood manner.
CURRENT CASE COUNT: 817 (As of 05/3/2025)
• Texas: 688 (+20)(62% of these cases are in Gaines County).
• New Mexico: 67 (+1 )(92.4% of the cases are from Eddy County)
• Oklahoma: 16 (+1)
• Kansas: 46 (32% of the cases are from Gray County)
HOSPITALIZATIONS: 97 (+2)
• Texas: 89 (+2) - This is 13.02% of all TX cases.
• New Mexico: 7 - This is 10.6% of all NM cases.
• Kansas: 1 - This is 2.7% of all KS cases.
DEATHS: 3
• Texas: 2 – This is 0.31% of all cases
• New Mexico: 1 – This is 1.54% of all cases
US NATIONAL CASE COUNT: 967 (Confirmed and suspected):
INTERNATIONAL SPREAD (As of 4/2/2025)
• Mexico – 865 (+58)
‒Chihuahua, Mexico: 844 (+58) cases, 3 hospitalizations, 1 fatality
• Canada: 1531 (+270) (This reflects Ontario's Outbreak, which began 11/24)
‒Ontario, Canada – 1243 (+223) cases, 84 hospitalizations.
• Europe: 6,814
This chapter provides an in-depth overview of the viscosity of macromolecules, an essential concept in biophysics and medical sciences, especially in understanding fluid behavior like blood flow in the human body.
Key concepts covered include:
✅ Definition and Types of Viscosity: Dynamic vs. Kinematic viscosity, cohesion, and adhesion.
⚙️ Methods of Measuring Viscosity:
Rotary Viscometer
Vibrational Viscometer
Falling Object Method
Capillary Viscometer
🌡️ Factors Affecting Viscosity: Temperature, composition, flow rate.
🩺 Clinical Relevance: Impact of blood viscosity in cardiovascular health.
🌊 Fluid Dynamics: Laminar vs. turbulent flow, Reynolds number.
🔬 Extension Techniques:
Chromatography (adsorption, partition, TLC, etc.)
Electrophoresis (protein/DNA separation)
Sedimentation and Centrifugation methods.
dynastic art of the Pallava dynasty south IndiaPrachiSontakke5
Ad
Basic Algorithms and Array along with Structure.pptx
1. Declaration
• A string variable is declared as an array of characters.
Syntax:
char string_name[size];
e.g. char s[5];
• When the compiler assigns a character string to a
character array, it automatically supplies a null character
(‘0’) at the end of the string
VIIT, Pune 1
2. Initialization
Initialization Syntax:
char myString [] = { 'H','A','E','S', 'L', 'E', 'R', '0' } ;
char myString[13] = “Initial value”
char myString[] = “Initial value”;
0 = null character
Note: that ‘0’ and ‘0’ are not same.
• When we initialize a character array by listing its elements, the null
terminator or the size of the array must be provided explicitly.
• When declaring a string don’t forget to leave a space for the null
character which is also known as the string terminator character
because it is only way the functions that work with a string can know
where the string ends.
n i t i a l v a l u e ? ? …
I 0
Compilation time
initialization
VIIT, Pune 2
4. • Memory for strings must be allocated before the string can be
used.
• A string literal is enclosed in double quotes
VIIT, Pune 4
5. Reading String from terminal
• Input function scanf can be used with %s format specification to
read in a string of characters.
• Example: char address[10]; scanf(“%s”, address);
• The scanf function automatically terminates the string that is read
with a null character.
• %ws format specification can be used for reading a specified
number of characters from the input string.
• scanf with %s or %ws can ready only strings without whitespaces.
• C supports a format specification known as the edit set conversion
code %[..] that can be used to read a line containing a variety of
characters, including whitespaces.
• Example:
char line[80];
scanf(“%[^n]”,line);
VIIT, Pune 5
6. Library functions
• There are various string handling functions define in
string.h some of them are:
VIIT, Pune 6
7. strlen()
• In C, strlen() function calculates the length of string.
• It takes only one argument, i.e, string name.
Syntax:
temp_variable = strlen(string_name);
• Function strlen() returns the value of type integer.
VIIT, Pune 7
8. strcpy()
• Function strcpy() copies the content of one string to the
content of another string.
• Syntax of strcpy()
strcpy(destination,source);
VIIT, Pune 8
9. strcat()
• concatenates(joins) two strings.
• resultant string is stored in the first string
specified in the argument.
Syntax of strcat()
strcat(first_string,second_string);
VIIT, Pune 9
10. strcmp()
• compares two string and returns value 0, if the two strings are
equal.
Syntax of strcmp()
temp_varaible=strcmp(string1,string2);
VIIT, Pune 10
12. strlwr()
• function converts all the uppercase characters in that string to
lowercase characters.
• The resultant from strlwr() is stored in the same string.
Syntax of strlwr():-
strlwr(string_name);
VIIT, Pune 12
13. strupr()
• function converts all the lowercase characters in that string to
uppercase characters.
• The resultant from strupr() is stored in the same string.
Syntax of strupr()
strupr(string_name);
VIIT, Pune 13
14. Structure in C
– Introduction to structure
• Definition
• declaration of structure, declaration of structure variables
• initialization,
• accessing members of structure
• Array of structures
Vishwakarma Institute of Information
Technology
14
15. What is structure
• Structure is user defined data type which allows to combine
data items of different kinds
• Structures are used to represent a record
• For example to keep track of books in a library, following
attributes about each book has to maintained−
– Book ID (Data Type – Int)
– Title (Data Type – Char)
– Author (Data Type – Char)
– Publication (Data Type – Char)
– Price (Data Type – Float)
Vishwakarma Institute of Information
Technology
15