







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A Study Tool for Data Structures & ALgorithm in C Programming Language
Typology: Study notes
1 / 13
This page cannot be seen from the preview
Don't miss anything!
● Arrays ● Functions ● Conditional Statements ● Switch Case ● Printf/Scanf Stacks- “last in, first out” Queues- “first come, first serve” / “first in first out” Trees- “root is on top” Graphs- “relation” Maps- “routes” Sets- “collection” ➢ DATA STRUCTURE ● Data
- “raw” / “unprocessed facts”
● Size is fixed ● Di cult to insert and delete ● If capacity is more and occupancy less, most of the array gets wasted ● Needs contiguous memory to get allocated.
- Essential tools in computer science, enabling e cient data retrieval and influencing various applications and algorithms. ● LINEAR SEARCH
Examples: ➢ ACCESSING ARRAY ELEMENTS
➢ CREATING MULTI-DIMENSIONAL ARRAYS
1. Access an element in a multidimensional array: ● To access an element in a multidimensional array: ● Specify both the row index and the column index. ● The indices start from 0 for the first row/column and go up to rowSize-1 and columnSize-1 respectively.
➢ FUNCTION DEFINITION & DECLARATION ➢ CALLING FUNCTIONS ● To call a function, use its name followed by parentheses (). ● If the function takes arguments, provide the values inside the parentheses. ● If the function returns a value, you can store it in a variable or use it directly in an expression. ● By breaking down a program into smaller functions, developers can easily manage and update specific parts of the code without a ecting the entire program. ● Proper usage of functions enhances code modularity and promotes good programming practices. EXAMPLES: OUTPUT: Result is : 8 OUTPUT: Result is : 8
➢ ACTUAL PARAMETERS
➢ SYNTAX OF FUNCTIONS W/ RETURN VALUES ➢ FUNCTION WITH MULTIPLE ARGUMENTS & RETURN VALUES ➢ LOCAL VS. GLOBAL VARIABLES