Generated by All in One SEO v4.9.2, this is an llms.txt file, used by LLMs to index the site. # Garg's Academy Free Online Coaching from Educational Experts ## Sitemaps - [XML Sitemap](https://gargsacademy.com/sitemap.xml): Contains all public & indexable URLs for this website. ## Posts - [Sets and its related terms](https://gargsacademy.com/sets/) - Sets: It is a collection of distinct objects, also called elements or members. These objects can be anything, such as numbers, letters, or even other sets. Sets are usually denoted by capital letters, and their elements are enclosed within curly braces. Examples:1) A = {1, 2, 3, 4, 5} (Set A consists of the numbers - [DCRUST BCA Math Semester I](https://gargsacademy.com/dcrust-bca-math-semester-i/) - DCRUST SYLLABUS BCA 111 C Math CATEGORY : BCA COURSE Unit I SETS: Sets, Subsets, Equal Sets Universal Sets, Finite and Infinite Sets, Operation on Sets, Union, Intersection and Complements of Sets, De-Morgan's laws, Cartesian Product, Equivalent sets, Countable and uncountable sets, cardinality of a Set, Simple Applications.RELATIONS AND FUNCTIONS: Properties of Relations, Equivalence Relation, - [CBSE XII Computer Science (083)](https://gargsacademy.com/cbse-xii-computer-science-083/) - Computational Thinking and Programming Functions: types of function (built-in functions, functions defined in module, user defined functions), creating user defined function, arguments and parameters, default parameters, positional parameters, function returning value(s), flow of execution, scope of a variable (global scope, local scope) Introduction to files, types of files (Text file, Binary file, CSV file), relative - [XII IP (065)](https://gargsacademy.com/xii-ip-065/) - Data Handling using Pandas Introduction to Python libraries- Pandas, Matplotlib. Data structures in Pandas - Series and Data Frames. Series: Creation of Series from – ndarray, dictionary, scalar value; mathematical operations; Head and Tail functions; Selection, Indexing and Slicing. Data Frames: creation - from dictionary of Series, list of dictionaries, Text/CSV files; display; iteration; Operations - [Units of Memory](https://gargsacademy.com/units-of-memory/) - 1 Bit = 1 Binary Digit ( 0 or 1 )1 Nibble = 4 bits1 Byte = 8 bits1 Kilo Byte (KB) = 1024 Bytes = 210 Bytes1 Mega Byte (MB) = 1024 KB = 210 KB1 Giga Byte (GB) = 1024 MB = 210 MB1 Terra Byte (TB) = 1024 GB = 210 GB1 - [HPSC PGT Computer Science Syllabus](https://gargsacademy.com/hpsc-pgt-computer-science-syllabus/) - Computer Systems and Organisation Basic Computer Organisation: lntroduction to computer system, hardware, software, input device, output device, CPU, memory (primary, cache and secondary), units of memory (Bit, Byte, KB. MB, GB, TB, PB). Types of software: system software (operating systems, system utilities, device drivers), programming tools and language translators assembler, compiler & interpreter), application software. - [Graphs Definitions](https://gargsacademy.com/graphs-definitions/) - In data structures, graphs are a fundamental concept used to represent networks of interconnected nodes or vertices. They consist of two main components: vertices (nodes) and edges. Here are some key definitions related to graphs: Vertex (Node): A fundamental unit of a graph, representing a data point or an entity. In some contexts, vertices can - [Device Drivers](https://gargsacademy.com/device-drivers/) - Device drivers are specialized software programs that enable an operating system to communicate and interact with hardware components or peripherals attached to a computer system. They serve as an intermediary between the operating system and the hardware, allowing them to work together seamlessly. Here are some examples of device drivers along with their purposes: Printer - [Introduction to Python](https://gargsacademy.com/introduction-to-python/) - Python General Purpose High Level Computer Programming Language Developed by Python Software Foundation At National Research Institute for Mathematics and Computer Science located at Netherlands By Guido Van Rossum in 1980's Versions- Python 1.0, Python 2.0, Python 3.0 2 major versions: Python 2 and Python 3 Can be installed from from http://python.org/. Features of Python: Interpreted: - [Data Structures GATE 2022 Solved Questions](https://gargsacademy.com/data-structures-gate-2022-solved-questions/) - Ques 1:Consider the problem of reversing a singly linked list. To take an example, given the linked list below, GATE 2022 Q no 15 the reversed linked list should look like Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in O(1) space? (A) The best algorithm for the - [Data Structures Important Questions Answers](https://gargsacademy.com/data-structures-important-questions-answers/) - What do you mean by data structure? Explain various types of data structures. What do you mean by operations of data structure? Explain various types of operations that can be performed on data structures. What do you mean by Analysis of an Algorithm? Explain Worst Case, Average Case and Best Case Complexity. What do you - [Program to enter and display elements of an array](https://gargsacademy.com/program-to-enter-and-display-elements-of-an-array/) - Program #include int main() { printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP to enter and display an array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************\n"); int n,i,a[5]; printf("Enter no. of elements in the array\n"); scanf("%d",&n); printf("enter array elements"); for(i=0;i - [Tokens in Python 3.9](https://gargsacademy.com/tokens-in-python-3-9/) - Tokens: A token is the smallest individual unit in a python program. There are 5 types of tokens in Python: keywords Identifier Literal/Constant Operator Punctuator/Separator Keywords: These are reserved words in python used for some specific purpose. They cant be used as variable names, function names, or any other general purpose. There are 36 keywords - [Python (Python PROGRAMMING LANGUAGE)](https://gargsacademy.com/python-python-programming-language/) - Familiarization with the basics of Python Programming: Introduction to Python, features of Python, executing a simple "hello world" program, execution modes: interactive mode and script mode, Python character set, Python tokens (keyword, identifier, literal, operator,punctuator), variables, concept of l-value and r-value, use of comments Knowledge of data types: number (integer, floating point, complex), boolean, sequence - [KVS PGT Computer Science Syllabus](https://gargsacademy.com/kvs-pgt-computer-science-syllabus/) - Computer Systems and Organisation Basic Computer Organisation: lntroduction to computer system, hardware, software, input device, output device, CPU, memory (primary, cache and secondary), units of memory (Bit, Byte, KB. MB, GB, TB, PB). Types of software: system software (operating systems, system utilities, device drivers), programming tools and language translators assembler, compiler & interpreter), application software. - [DSA LAB (Data Structures and Algorithms Lab)](https://gargsacademy.com/dsa-lab-data-structres-and-algorithms-lab/) - Important Question Answers of Data Structure for Exams List of Programs: WAP to enter and display an array. WAP to find the sum of elements of an array. WAP to find the average of elements of an array. WAP to find the product of elements of an array. WAP to find the minimum of array - [Two Dimensional Array Address Calculation Questions](https://gargsacademy.com/two-dimensional-array-address-calculation-questions/) - Q1:An array P[50][60] is stored in the memory along the column with each of the element occupying 2 bytes, find out the memory location for the element P[10][20], if the Base Address of the array is 6800.Ans: Given Number of Rows, R=50Number of Columns, C=60Lower Bound of Row, LBr=0Lower Bound of Column, LBc=0size or width - [Data Structures and its types](https://gargsacademy.com/data-structures-and-its-types/) - Data Structure – Data Structures are not only allow the user to combine various data types in a group but also allow processing of the group as a single unit thereby making things much simpler and easier. The data structure can be classified into two types:1. Simple Data Structure2. Compound Data StructureSimple Data Structure – are - [Program to search an element in a Linked List in Memory](https://gargsacademy.com/program-to-search-an-element-in-a-linked-list-in-memory/) - Program: #include #include struct student { int rollno; char name[20]; float fee; struct student *next; }; struct student *start = NULL; void insertnode() { struct student *newstudent = (struct student *)malloc(sizeof(struct student)); if (newstudent == NULL) printf("Overflow: Memory Full. You cant insert more items\n"); else { printf("\nenter student roll no: "); scanf("%d", &newstudent->rollno); - [Program to implement a Linked List in Memory](https://gargsacademy.com/program-to-implement-a-linked-list-in-memory/) - Program: #include #include struct student { int rollno; char name[20]; float fee; struct student *next; }; struct student *start = NULL; void insertnode() { struct student *newstudent = (struct student *)malloc(sizeof(struct student)); if (newstudent == NULL) printf("Overflow: Memory Full. You cant insert more items\n"); else { printf("\nenter student roll no: "); scanf("%d", &newstudent->rollno); - [DAA LAB (Design and Analysis of Algorithms LAB)](https://gargsacademy.com/daa-lab-design-and-analysis-of-algorithms-lab/) - List of Programs: WAP to find sum of first n natural numbers, using functions, and calculate its complexity. WAP to find sum of squares of first n natural numbers, using functions, and calculate its complexity. WAP to find sum of cubes of first n natural numbers, using functions, and calculate its complexity. WAP to find - [Program to implement a Dynamic Queue using Linked List](https://gargsacademy.com/program-to-implement-a-dynamic-queue-using-linked-list/) - Program: #include #include struct student { int rollno; char name[20]; float fee; struct student *next; }; struct student *front = NULL; struct student *rear = NULL; void enqueue() { struct student *newstudent = (struct student *)malloc(sizeof(struct student)); if (newstudent == NULL) printf("Overflow: Memory Full. You cant insert more items\n"); else { printf("\nenter student - [Program to implement a Static Circular Queue using Array](https://gargsacademy.com/program-to-implement-a-static-circular-queue-using-array/) - Program: #include #include int front = -1; int rear = -1; int qu[5]; void enqueue() { if ((front == 0 && rear == 4) || front == rear + 1) printf("Overflow: Queue is Full. You cannot add more items"); else { if (front == -1) front = rear = 0; else if (rear - [Program to implement a Static Circular Queue using Array of Structure](https://gargsacademy.com/program-to-implement-a-static-circular-queue-using-array-of-structure/) - Program: #include #include struct student { int rollno; char name[10]; float fee; }; int front = -1; int rear = -1; struct student qu[5]; void enqueue() { if ((front == 0 && rear == 4) || front == rear + 1) printf("Overflow: Queue is Full. You cannot add more items"); else { if - [Program to implement a Static Linear Queue using Array of Structure](https://gargsacademy.com/program-to-implement-a-static-linear-queue-using-array-of-structure/) - Program: #include #include struct student { int rollno; char name[10]; float fee; }; int front = -1; int rear = -1; struct student qu[5]; void enqueue() { if (rear == 4) printf("Overflow: Queue is Full. You cannot add more items"); else { if (front == -1) front = rear = 0; else rear - [Program to implement a Dynamic/Linked Stack using Linked List](https://gargsacademy.com/program-to-implement-a-dynamic-linked-stack-using-linked-list/) - Program: #include #include struct student { int rollno; char name[20]; float fee; struct student *next; }; struct student *top = NULL; void push() { struct student *newstudent = (struct student *)malloc(sizeof(struct student)); if (newstudent == NULL) printf("Overflow: Memory Full. You cant insert more items\n"); else { printf("\nenter student roll no: "); scanf("%d", &newstudent->rollno); - [Program to implement a Static Linear Queue using Array](https://gargsacademy.com/program-to-implement-a-static-linear-queue-using-array/) - Program: #include #include int front = -1; int rear = -1; int qu[5]; void enqueue() { if (rear == 4) printf("Overflow: Queue is Full. You cannot add more items"); else { if (front == -1) front = rear = 0; else rear = rear + 1; printf("\nenter value"); scanf("%d", &qu[rear]); } } void - [Program to implement a Static Stack using Array](https://gargsacademy.com/program-to-implement-a-static-stack-using-array/) - Program: #include #include int top = -1; int stk[5]; void push() { if (top == 4) printf("Overflow: Stack is Full. You cannot add more items"); else { top = top + 1; printf("\nenter value"); scanf("%d", &stk[top]); } } void pop() { if (top == -1) printf("underflow!!!. Stack is empty. No item to delete"); - [MCQs on Python Keywords](https://gargsacademy.com/mcqs-on-python-keywords/) - Which of the following is not a Python keyword? a) and b) try c) exception d) classAns: c) exception What does the Python keyword "lambda" do? a) creates a new function b) defines a loop c) raises an exception d) defines a classAns: a) creates a new function What is the purpose of the Python - [Program to implement a Static Stack using Array of Structures](https://gargsacademy.com/program-to-implement-a-static-stack-using-array-of-structures/) - Program: #include #include struct student { int rollno; char name[20]; float fee; }; int top = -1; struct student stk[5]; void push() { if (top == 4) printf("Overflow: Stack is Already Full. You cant insert more items\n"); else { top = top + 1; printf("\nenter student roll no: "); scanf("%d", &stk[top].rollno); printf("enter name: - [Progarm to find sum/ difference /multiplication/ quotient/ remainder of two numbers in C](https://gargsacademy.com/progarm-to-find-sum-difference-multiplication-quotient-remainder-of-two-numbers-in-c/) - Program #include int main() { int a, b, sum, diff, mul, quo, rem; printf("**********************************************"); printf("\n**********************************************"); printf("\n** WAP to do basic calculations **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**********************************************"); printf("\n**********************************************"); printf("\nEnter two numbers a and b"); scanf("%d%d",&a,&b); sum=a+b; diff=a-b; mul=a*b; quo=a/b; rem=a%b; printf("\nthe value of sum - [Program to Display a message in C](https://gargsacademy.com/program-to-display-a-message-in-c/) - Program #include int main() { printf ("****************************************************************"); printf ("\n****************************************************************"); printf ("\n** Program to display a message in C **"); printf ("\n** Created by Sheetal Garg **"); printf ("\n** Assistant Professor **"); printf ("\n** Phone No:9467863365 **"); printf ("\n****************************************************************"); printf ("\n****************************************************************"); printf ("\nWelcome to Programming"); return 0; } Output **************************************************************** **************************************************************** ** Program to display - [Program to find area and perimeter of a triangle in C](https://gargsacademy.com/program-to-find-area-and-perimeter-of-a-triangle-in-c/) - Program #include int main() { int base,h,area; printf("*********************************************************"); printf("\n*********************************************************"); printf("\n** WAP to find area and perimeter of a triangle **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*********************************************************"); printf("\n*********************************************************"); printf("\nenter the base of triangle \n "); scanf("%d",&base); printf("enter the height of triangle \n "); scanf("%d",&h); area = (base*h) - [Progarm to find area and perimeter of a square in C](https://gargsacademy.com/progarm-to-find-area-and-perimeter-of-a-square-in-c/) - Program #include int main() { int s,a,p; printf("**************************************************"); printf("\n**************************************************"); printf("\n** WAP to find area and perimeter of a square **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************"); printf("\n**************************************************"); printf("\nenter the side of square \n "); scanf("%d",&s); a = s*s; printf("the area of square is %d \n",a); p - [Program to find area and perimeter of a rectangle in C](https://gargsacademy.com/program-to-find-area-and-perimeter-of-a-rectangle-in-c/) - Program #include int main() { int l,b,a,p; printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to find area and perimeter of a rectangle **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************"); printf("\n****************************************************"); printf("\nenter the length of rectangle \n "); scanf("%d",&l); printf("enter the breadth of rectangle \n "); scanf("%d",&b); a = l*b; - [File Handling in Python](https://gargsacademy.com/file-handling-in-python/) - File: In Python, a file is a named area on disk or in memory used to store data permanently. A file can be used to store text, binary data, or other types of data. Python provides built-in functions and methods for working with files, which allows you to open, create, read, write, append, modify and - [Working with Binary Files in Python](https://gargsacademy.com/working-with-binary-files-in-python/) - Binary Files: In Python, a binary file is a file that contains textual and non-textual data, such as images, audio files, video files, and executable programs. Binary files are usually opened in binary mode to avoid any character encoding issues, and they can be read and written using the built-in file handling functions.1) It stores - [Program to multiply two matrices / 2D arrays](https://gargsacademy.com/program-to-multiply-two-matrices-2d-arrays/) - Program Time Complexity: O(r1 * c1 * c2) Space Compexity: 0(1) where r1 and c1 are the number of rows and columns in matrix A, and r2 and c2 are the number of rows and columns in matrix B #include int main() { printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to multiply two matrices or 2D arrays - [Discrete Mathematics Mathematical Logic GATE Previous Years Questions solutions](https://gargsacademy.com/discrete-mathematics-mathematical-logic-gate-previous-years-questions-solutions/) - Ques 1: What is the converse of the following assertion?I stay only if you go GATE 2001 (A) I stay if you go (B) If I stay then you go (C) If you dont go then I dont stay (D) If I dont stay then you go Ans: (B) If I stay then you go - [Linear Searching Find an element in 1-D array](https://gargsacademy.com/linear-searching-find-an-element-in-the-list-array/) - Searching It means to find the location of an item/element/value in an array/list. It will return or print the location of the item , if the item is present in the list/array, otherwise it will print "Not Found" or return a non valid index (say -1) Linear Search It searches the element in the list - [Linear Searching Find an element in the two dimensional array](https://gargsacademy.com/linear-searching-find-an-element-in-the-two-dimensional-array-using-function/) - Searching It means to find the location of an item/element/value in an array/list. It will return or print the location of the item , if the item is present in the list/array, otherwise it will print "Not Found" or return a non valid index (say -1) Linear Search It searches the element in the list - [Linear Searching Find an element in the list/1-D array Using Function](https://gargsacademy.com/linear-searching-find-an-element-in-the-list-array-using-function/) - Searching It means to find the location of an item/element/value in an array/list. It will return or print the location of the item , if the item is present in the list/array, otherwise it will print "Not Found" or return a non valid index (say -1) Linear Search It searches the element in the list - [Program to delete an element from the array and display the array after deleting element](https://gargsacademy.com/program-to-delete-an-element-from-the-array-and-display-the-array-after-deleting-element/) - Program #include int main() { printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP for Deletion from an array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************\n"); int n,i,a[5],pos; printf("Enter no. of elements in the array\n"); scanf("%d",&n); printf("enter array elements"); for(i=0;i - [Program to add a new element in the array and display the array after adding element](https://gargsacademy.com/program-to-add-a-new-element-in-the-array-and-display-the-array-after-adding-element/) - Program #include int main() { printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP for insertion into an array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************\n"); int n,i,a[5],no,pos; printf("Enter no. of elements in the array\n"); scanf("%d",&n); printf("enter array elements"); for(i=0;i - [Working with Text Files in Python](https://gargsacademy.com/working-with-text-files-in-python/) - Text Files: In Python, a text file is a file that contains human-readable text. Text files are usually created with a text editor, and they can be read and written in Python using the built-in file handling functions.1) They store information in the form of ASCII/Unicode characters.2) Each line of text is terminated or delimited - [Import Export Data between CSV files and Data Frame in Python](https://gargsacademy.com/import-export-data-between-csv-files-and-data-frame-in-python/) - CSV (Comma Separated Values) Files: CSV Files stores a tabular data that has been saved as a plaintext, where data is separated by commas. It follows two rules:1) Number of rows in CSV File = Number of rows in table2) Comma , appears after every field (except the last field) RollNo Name Marks 1 Sheetal - [Program for quick sort with time complexity](https://gargsacademy.com/program-for-quick-sort-with-time-complexity/) - Program Time Complexity: O(n2) #include #include #include void Exch(int *p, int *q) { int temp = *p; *p = *q; *q = temp; } void QuickSort(int a[], int low, int high) { int i, j, key, k; if (low >= high) return; key = low; i = low + 1; j = - [Program for merge sort with time complexity](https://gargsacademy.com/program-for-merge-sort-with-time-complexity/) - Program Time Complexity: O(n log n) #include #include #include #include void Merge(int a[], int low, int mid, int high) { int i, j, k, b[20]; i = low; j = mid + 1; k = low; while (i - [Program to sort the elements of an array using insertion sort](https://gargsacademy.com/program-to-sort-the-elements-of-an-array-using-insertion-sort/) - ProgramTime Complexity: O(n2) #include int main() { printf("***************************************************************"); printf("\n***************************************************************"); printf("\n** WAP to sort the elements of an array using insertion sort **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n***************************************************************"); printf("\n***************************************************************\n"); int a[10],n,i,j,key; printf("enter the no. of elements in array"); scanf("%d",&n); printf("enter array elements"); for(i=0;i - [Program to sort the elements of an array using bubble sort](https://gargsacademy.com/program-to-sort-the-elements-of-an-array-using-bubble-sort/) - Program Time Complexity: O(n2) #include int main() { printf("***************************************************************"); printf("\n***************************************************************"); printf("\n** WAP to sort the elements of an array using bubble sort **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n***************************************************************"); printf("\n***************************************************************\n"); int a[10],n,i,j,temp; printf("enter the no. of elements in array"); scanf("%d",&n); printf("enter array elements"); for(i=0;i - [Program to sort the elements of an array using Selection sort](https://gargsacademy.com/program-to-sort-the-elements-of-an-array-using-selection-sort/) - Program (Without Function)Time Complexity: O(n2) #include int main() { printf("* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n"); printf("* WAP to sort the elements of an array using Selection sort *\n"); - [Program to transpose a matrix / 2D array](https://gargsacademy.com/program-to-transpose-a-matrix-2d-array/) - Program Time Complexity: O(mn)Space Complexity: O(mn)where m and n are number of rows and columns in matrix #include int main() { printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to transpose elements of a matrix/2D array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************"); printf("\n****************************************************\n"); int m, n, i, j, - [Program to subtract two matrices / 2D arrays](https://gargsacademy.com/program-to-subtract-two-matrices-2d-arrays/) - Program Time Complexity: O(m*n) where m and n are the number of rows and columns in matrix.Space Compexity: 0(1) m=max(r1,r2)n=max(c1,c2) #include int main() { printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to subtract two matrices or 2D arrays **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************"); printf("\n****************************************************\n"); int r1, - [Program to add two matrices / 2D arrays](https://gargsacademy.com/program-to-add-two-matrices-2d-arrays/) - Program Time Complexity: O(m*n) where m and n are the number of rows and columns in matrix.Space Compexity: O(1)m=max(r1,r2)n=max(c1,c2) #include int main() { printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to add two matrices or 2D arrays **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************"); printf("\n****************************************************\n"); int r1, c1, - [Program to print Fibonacci Series](https://gargsacademy.com/program-to-print-fibonacci-series/) - Fibonacci Series: It is a special series, where first term is 0 and second term is 1 and from third term onwards, every term is the sum of previous two terms.0 1 1 2 3 5 8 13 and so on..... Program (Without Function)Time Complexity: O(n)Space Compexity: O(1) #include int main() { printf("****************************************************************"); printf("\n****************************************************************"); - [PPS LAB : List of PROGRAMS](https://gargsacademy.com/pps-lab-list-of-programs/) - PPS LAB: Detailed List of Programs in C Language (WAP-Write a Program) WAP to Display message WAP to find Addition , Subtraction , Multiplication , Division , Remainder of two numbers WAP to find Area and Perimeter of Rectangle WAP to find Area and Perimeter of square WAP to find Area and Perimeter of triangle - [Program to generate Pascal's Triangle in C](https://gargsacademy.com/program-to-generate-pascals-triangle-in-c/) - Pascal's Triangle: It is a special triangle. All values outside the triangle are considered zero (0). The first row is 0 1 0 whereas only 1 acquire a space in pascal's triangle, 0s are invisible. Second row is acquired by adding (0+1) and (1+0). The output is sandwiched between two zeroes. The process continues till - [Program to check a number for prime in C](https://gargsacademy.com/program-to-check-a-number-for-prime-in-c/) - Logic: Prime Number A number is prime if it is divisible by 1 and the number itself only. Enter the number n Example 1: n=15 We will check whether number is divisible by any number from 2 to n-1 here 14. If it is divisible by any number (example 15 is divisible by 3) , - [Binary Search Find an element in the list/array](https://gargsacademy.com/binary-search-find-an-element-in-the-list-array/) - Searching It means to find the location of an item/element/value in an array/list. It will return or print the location of the item , if the item is present in the list/array, otherwise it will print "Not Found" or return a non valid index (say -1) Binary Search It searches the element in the list - [Program to find factorial/product of first n natural numbers using for loop](https://gargsacademy.com/program-to-find-factorial-product-of-first-n-natural-numbers-using-for-loop/) - Requirement: Enter the number n Product or Factorial= 1 x 2x 3 x 4 x.........x n Algorithm Enter the number as n Initially assign product=1 for(i=1;i - [Database Connectivity with MySQL in Python](https://gargsacademy.com/database-connectivity-with-mysql-in-python/) - Library Needed: We need any one of the following library to connect to the MySQL database with Python.1) mysql.connector : It is a library provided by oracle2) pymysql : It is pure Python library. Steps of Connectivity:1) Start Python2) Import the required library.3) Open a Connection4) Create a cursor instance.5) Execute the SQL query.6) Extract - [Program to find maximum of elements of a 2-D array](https://gargsacademy.com/program-to-find-maximum-of-elements-of-a-2-d-array/) - Program (Without Using Function) #include int main() { printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP to find maximum element from a 2-D array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************\n"); int r, c, i, j, a[10][10], max; printf("Enter no. of rows and columns in the array\n"); scanf("%d%d", - [Program to find minimum of elements of a 2-D array](https://gargsacademy.com/program-to-find-minimum-of-elements-of-a-2-d-array/) - Program (Without Using Function) #include int main() { printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP to find minimum element from a 2-D array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************\n"); int r, c, i, j, a[10][10], min; printf("Enter no. of rows and columns in the array\n"); scanf("%d%d", - [CBSE XI Informatics Practices (IP 065)](https://gargsacademy.com/cbse-xi-informatics-practices-ip-065/) - Introduction to Computer System Introduction to computers and computing: evolution of computing devices, components of a computer system and their interconnections, Input/Output devices. Computer Memory: Units of memory, types of memory – primary and secondary, data deletion, its recovery and related security concerns. Software: purpose and types – system and application software, generic and specific - [CBSE XI Computer Science (083)](https://gargsacademy.com/cbse-xi-computer-science-083/) - Computer Systems and Organisation Basic Computer Organisation: lntroduction to computer system, hardware, software, input device, output device, CPU, memory (primary, cache and secondary), units of memory (Bit, Byte, KB. MB, GB, TB, PB). Types of software: system software (operating systems, system utilities, device drivers), programming tools and language translators assembler, compiler & interpreter), application software. - [Conditional statements in Python](https://gargsacademy.com/conditional-statements-in-python/) - Conditional Statements: It tests a condition and executes a particular statement or a group of statements depending upon the result of the condition. It is a compound statement i.e. it contains other statements. Python supports following types of conditional statements1) if2) if else3) if elif else4) Nested if else if statement: It tests a condition - [Program to check a number for prime in C using function](https://gargsacademy.com/program-to-check-a-number-for-prime-in-c-using-function/) - Logic: Prime Number A number is prime if it is divisible by 1 and the number itself only. Enter the number n Example 1: n=15 We will check whether number is divisible by any number from 2 to n-1 here 14. If it is divisible by any number (example 15 is divisible by 3) , - [Program to print sum of digits of a number in C](https://gargsacademy.com/program-to-print-sum-of-digits-of-a-number-in-c/) - Program Requirement: Enter the number n example n=345sum= 3+ 4 + 5 =12 Algorithm Enter the number as n Initially assign sum=0 while(n>0) { r=n%10; sum=sum+r; n=n/10; } Print sum Explanation: 1) n = 3452) sum = 03) a) check if 345 > 0 returns true r = n % 10 = 345 % 10 - [Functions of an Operating System](https://gargsacademy.com/functions-of-an-operating-system/) - Operating System (OS) It is an interface between a computer user and computer hardware. It enables applications/softwares to interact with a computer's hardware. Its purpose is to manage a system's hardware and software resources. It is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and - [Operating System Introduction](https://gargsacademy.com/operating-system-introduction/) - Operating System (OS) It is an interface between a computer user and computer hardware. It enables applications/softwares to interact with a computer's hardware. Its purpose is to manage a system's hardware and software resources. It is a software which performs all the basic tasks like file management, memory management, process management, handling input and output, and - [Input Output Statements in Python](https://gargsacademy.com/input-output-statements-in-python/) - Input Statements in Python: We can read the variables by using python input() function as:1) We can write any string/text to be displayed at the python prompt as an argument to the input function.2) If we don't specify any string/text to be displayed at the python prompt , then nothing will be displayed. But we - [Type Conversion in Python](https://gargsacademy.com/type-conversion-in-python/) - Type Conversion: It means to convert the operands of one data type into another data type. Types of Conversions: Python supports two types of conversions:1) Implicit Type Promotion/ Internal Conversion 2) Explicit Type Casting/ External Conversion 1) Implicit Type Promotion/ Internal Conversion : It is the conversion done by the python compiler/interpreter without user's intervention.1) - [Expressions in Python](https://gargsacademy.com/expressions-in-python/) - Expressions: It is any valid combination of operators and operands (may be literals / variables). It is composed of one or more operations. Example 1) 5 + 4 is valid2) 5 + -4 is valid3) 5 + * 6 is invalid because in this case, compiler will be confused which operation whether + or * - [Data Types in Python](https://gargsacademy.com/data-types-in-python/) - Data Type: It specifies the type of data and associated operations of handling it. Different set of operations are applicable on different types of data. Example: We can add, subtract, multiply, divide two numbers. But we cant subtract, multiply, divide two strings ie textual data. Data Types in Python: Following data types are supported in - [Mutable and Immutable Data Types in Python](https://gargsacademy.com/mutable-and-immutable-data-types-in-python/) - Working of Python: In python, variables are stored as references to a value object. Each time you change the value, the variable's reference memory address changes. Python frontloads some commonly used values in memory. Each variable referring to that value actually stores that memory address of the value. Multiple variables/identifiers can refer to a single - [Flow of Control in Python](https://gargsacademy.com/flow-of-control-in-python/) - Statements Flow Control: It determines the order of execution of statements in a program. Types of Statements Flow Control: There are 3 types of flow control in python.1) Sequential Flow2) Conditional / Branching / Decision Making / Selection Statements3) Iteration/ Repetition/ Looping Statements 1) Sequential Flow: In it, statements are executed in sequence one after - [Statements in Python](https://gargsacademy.com/statements-in-python/) - Statements: It is a command or instruction that the python interpreter can understand and execute. If we type a statement on the command line, Python executes it.We may also write a sequence/group of statements in a script/program. Types of Statement: There are 3 types of statements:1) Empty Statement2) Simple Statements3) Compound Statements / Block Empty Statement: - [Indentation in Python](https://gargsacademy.com/indentation-in-python/) - Indentation It refers to the (spaces and tabs) that are used at the beginning of a statement. It is used to create groups/blocks/compound statements in python.The statements with the same indentation belong to the same group/block. Block / Compound Statement It is a group of statements (piece of python program text) executed as a unit. The - [Functions of Dictionaries in Python](https://gargsacademy.com/functions-of-dictionaries-in-python/) - Dictionary: Dictionaries are used to store multiple items in key : value form separated by a , (keys and values may be of same type elements ie homogeneous data types or different types elements ie heterogeneous data types) in a single variable. It is a comma separated list of key:value pairs enclosed in braces { - [Structure of a program in Python](https://gargsacademy.com/structure-of-a-program-in-python/) - The structure of a program is defined by its control flow. It is built from blocks of code, where each block has a single entry and a single exit point in the control flow.The typical structure of a python program include 3 partsImport statements// import statements are used to include library files to the python - [Variables in Python](https://gargsacademy.com/variables-in-python/) - Variable : It is a symbolic name that is a reference or pointer to an object. Once an object is assigned to a variable, you can refer to the object by that name. Example: a=5b=10.78c=2 + 7jd="Gargs Academy"e=Truef=Nonea,b,c,d,e,f are variables of different types. We can assign any type of value to a variable in python. - [Precedence and Associativity of Operators in Python](https://gargsacademy.com/precedence-and-associativity-of-operators-in-python/) - Precedence: It gives the order of execution of operators in an expression i.e. gives an idea about which operator is to be executed first when there are multiple operators in an expression.Example: The expression 4+3 * 2 can be solved by two ways. But only way1 is correct Way 1) 4+3 * 2=4+6 (3 * - [Operators in Python](https://gargsacademy.com/operators-in-python/) - Operator: It is a symbol that performs some action. Python supports following types of operators: Arithmetic operators : + , - , * , / , // , % , ** Relational/Comparison operators: < , , >= , == , != Logical operators: and , or , not Assignment operators: = Augmented - [HPSC Assistant Professor Computer Science Question Paper 2019 Solution](https://gargsacademy.com/hpsc-assistant-professor-computer-science-question-paper-2019-solution/) - Year: 2019 Session: Morning Paper Code: 702 Ques 1: MS JK Flip Flop is equivalent to: (A) JK Flip Flop(B) SR Flip Flop(C) Negative Edge Triggered Flip Flop(D) Positive Edge Triggered Flip FlopAns : (C) Negative Edge Triggered Flip Flop Ques 2: How many 3 to 8 line decoders with an enable input are needed - [Functions of Strings in Python](https://gargsacademy.com/functions-of-strings-in-python/) - Strings: Any combination of characters or text written in single, double, or triple quotes are treated as strings. Internally strings are stored in single quotes. Example:#string of lowercase and uppercase alphabetsstring1="Gargs Academy"#string of alphanumeric characters ie alphabets and digits string2="Phone no 9467863365"#empty Stringstring3="" Creating Strings by directly assigning string literals: We can create both empty - [Functions of tuples in Python](https://gargsacademy.com/functions-of-tuples-in-python/) - Tuples: Tuples are used to store multiple items (may be of same type elements ie homogeneous data types or different types elements ie heterogeneous data types) in a single variable. It is a comma separated list of values enclosed in paranthesis ( ). Example:tuple1=(2,3,4,5) #tuple of homogeneous elements tuple2=("gargs", 100, 24.56 ) #tuple of heterogeneous - [Functions of lists in Python](https://gargsacademy.com/functions-of-lists-in-python/) - Lists: Lists are used to store multiple items (may be of same type elements ie homogeneous data types or different types elements ie heterogeneous data types) in a single variable. It is a comma separated list of values enclosed in square brackets [ ]. Example:list1=[2,3,4,5] #list of homogeneous elements list2=["gargs", 100, 24.56 ] #list of - [Modules in Python](https://gargsacademy.com/modules-in-python/) - Module: It is a file containing python definitions and statements. It may contain functions, classes, and variables. Grouping related code into a module makes the code easier to understand and use. How to import a module: We can import a module in python asimport modulename >>> import math >>> import random >>> import statistics We - [Types of Errors in Python](https://gargsacademy.com/types-of-errors-in-python/) - Error/Bug: Error is a mistake/bug in the program which makes the behavior of the program abnormal. It prevents a program from compiling and running correctly. So, the errors must be removed from the program for the successful execution of the program. Programming errors are also known as the bugs. These errors are detected either during - [Program to create a class and a single object and access class functions](https://gargsacademy.com/program-to-create-a-class-and-a-single-object-and-access-class-functions/) - #include #include using namespace std; class student { private: int rollno; char name[20]; int marks; float fee; public: void getdata() { coutrollno; fflush(stdin); cout - [Comments in Python](https://gargsacademy.com/comments-in-python/) - Comments: These are the statements that are ignored by the python interpreter and not executed at all. Why Comments are used:1) To explain the program2) To make the program more understandable3) To prevent the statements from execution for testing purpose. Types of Comments in Python: 1) Single Line Comment2) Multi LIne Comment Single Line Comment: - [AJ (Advance Java)](https://gargsacademy.com/aj-advance-java/) - DCRUST SYLLABUS BCA301C Advanced Java CATEGORY : BCA COURSE Course Objectives: To familiar with concept of advanced java application and the design and development ofGUI application using Swings.To connect data structure and database with the Java Project.To develop web application by creating client and server pages using servlet.To practice the alternate of servlet i.e. Java - [OS (Operating Systems)](https://gargsacademy.com/os-operating-systems/) - DCRUST SYLLABUS BCA205 OPERATING SYSTEMS CATEGORY : BCA COURSE Course Objectives: To understand the services provided by operating system and the design of an operating system. To understand the structure and organization of the file system.To understand what a process is and how processes are synchronized and scheduled.To understand different approaches to memory management. Unit - [Solution of DCRUST PhD Computer Science Entrance Exam Dec 2018](https://gargsacademy.com/solution-of-dcrust-phd-computer-science-entrance-exam-dec-2018/) - RESEARCH METHODOLOGY FOR ENGINEERING Q1: A pot is fully filled (upto brims) with water. A cube of ice floating in it is partially submerged and partially seen above the water level. As the ice cube fully melts, what will happen to the level of water ? (A) The water spills over(B) The water level decreases(C) - [Program to explain use of Scanner class in Java](https://gargsacademy.com/program-to-explain-use-of-scanner-class-in-java/) - Program in Java to input roll no and name of a student using Scanner class and print the details) Program Code: package javaapplication1; import java.util.Scanner; public class JavaApplication1 { public static void main(String[] args){ Scanner in= new Scanner(System.in); System.out.println("Enter your Roll No"); int rn= in.nextInt(); System.out.println("Enter your name"); in.nextLine(); /* To clear the input buffer - [Program to explain use of BufferedReader class in Java](https://gargsacademy.com/program-to-explain-use-of-bufferedreader-class-in-java/) - Program in Java to input roll no and name of a student using BufferedReader class and print the details Program Code: package javaapplication1; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; public class JavaApplication1 { public static void main(String[] args) throws IOException{ InputStreamReader r=new InputStreamReader(System.in); BufferedReader br=new BufferedReader(r); System.out.println("Enter your Roll No"); int rn= Integer.parseInt(br.readLine()); System.out.println("Enter your - [AJ LAB (ADVANCED JAVA LAB)](https://gargsacademy.com/aj-lab-advanced-java-lab/) - DCRUST SYLLABUS CSE388C ADVANCED JAVA LAB CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To use graphics, Animations and Multithreading for designing Simulation and Game based applications.To design and develop GUI applications using Abstract Windowing Toolkit (AWT), Swing and Event Handling.To design and develop Web applicationsTo design Enterprise based applications by encapsulating an application’s business logic. LIST - [Components of an Operating System](https://gargsacademy.com/components-of-an-operating-system/) - Components of an operating system : An operating system is a large and complex system that can only be created by partitioning into small parts. These pieces should be a well-defined part of the system, carefully defining inputs, outputs, and functions. Although Windows, Mac, UNIX, Linux, and other OS do not have the same structure, - [WAP to explain Call by Reference Method of Function Call](https://gargsacademy.com/wap-to-explain-call-by-reference-method-of-function-call/) - Program #include void change(int *a, int *b) { int t=*a; *a = *b; *b = t; printf("\nIn the Function Values are changed"); printf("\na= %d and b= %d", *a, *b); } int main() { printf("***************************************************************"); printf("\n***************************************************************"); printf("\n** WAP to explain Call by Reference Method **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); - [GATE CS/IT 2017 Set 1](https://gargsacademy.com/gate-cs-it-2017-set-1/) - Graduate Aptitude Test in Engineering Date: 4th Feb 2017 General Aptitude (GA) Q.1 – Q.5 Carry ONE mark each. Q. 6 – Q. 10 Carry TWO marks each. Q 1. After Rajendra Chola returned from his voyage to Indonesia, he ________ to visit the temple in Thanjavur. (A) was wishing (B) is wishing (C) wished - [Programming GATE 2017 Set 1 Solved Questions](https://gargsacademy.com/programming-gate-2017-set-1-solved-questions/) - Ques 1: Consider the following C code: GATE 2017 Q no 13 #include int *assignval (int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return; x = assignval (x,0); if (x) { x = (int *)malloc(sizeof(int)); if (NULL == x) return; - [Algorithm GATE 2022 Solved Questions](https://gargsacademy.com/algorithm-gate-2022-solved-questions/) - Ques 1:Which one of the following statements is TRUE for all positive functions f(n)? GATE 2022 Q no 11 (A) f(n2)=θ(f(n)2), when f(n) is a polynomial (B) f(n2)=o(f(n)2) (C) f(n2)=O(f(n)2), when f(n) is an exponential function (D) f(n2)=Ω(f(n)2) Ans: (A) f(n2)=θ(f(n)2), when f(n) is a polynomial Solution: Analyse, f(n2) versus f(n)2 asymptomatically Take f(n)=log nf(n2)= log n2 = 2 log n f(n)2=(log n)2Here f(n2)f(n)2 because n2>2n Take f(n) as polynomial say, f(n)=n3 f(n2)=n6f(n)2=n6.Here f(n2)=f(n)2 Ques 2: Consider - [Computer Networks GATE 2022 Solved Questions](https://gargsacademy.com/computer-networks-gate-2022-solved-questions/) - Ques 1: Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below. GATE 2022 Q no 22 What is the number of subnets inside the enterprise network? (A) 3 (B) 12 (C) 6 (D) 8 Ans: (C) 6 Solution: For each interface, router has - [DBMS GATE 2022 Solved Questions](https://gargsacademy.com/dbms-gate-2022-solved-questions/) - Ques 1:In a relational data model, which one of the following statements is TRUE? GATE 2022 Q no 14 (A) A relation with only two attributes is always in BCNF. (B) If all attributes of a relation are prime attributes, then the relation is in BCNF. (C) Every relation has at least one non-prime attribute - [Computer Architecture GATE 2022 Solved Questions](https://gargsacademy.com/computer-architecture-gate-2022-solved-questions/) - Ques 1: Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput? GATE 2022 Q no 17 (A) DMA based I/O transfer (B) Interrupt driven I/O transfer (C) Polling based I/O transfer (D) Programmed I/O transfer Ans: (A) DMA based I/O transfer Solution: DMA(Direct Memory Access) is used for transferring bulk data from Main Memory with the - [Discrete Mathematics GATE 2022 Solved Questions](https://gargsacademy.com/discrete-mathematics-gate-2022-solved-questions/) - Ques 1: Consider the following two statements with respect to the matrices Amxn, Bnxm,Cnxn and Dnxn GATE 2022 Q No 20 Statement 1: tr(AB) = tr(BA)Statement 2: tr(CD) = tr(DC)where tr() represents the trace of a matrix. Which one of the following holds? (A) Statement 1 is correct and Statement 2 is wrong. (B) Statement - [Programming GATE 2022 Solved Questions](https://gargsacademy.com/programming-gate-2022-solved-questions/) - Ques 1: What is printed by the following ANSI C program? GATE 2022 Q no 21 #include int main(int argc, char *argv[]) { int x = 1, z[2] = {10, 11}; int *p = NULL; p = &x; *p = 10; p = &z[1]; *(&z[0] + 1) += 3; printf("%d, %d, %d\n", x, z[0], z[1]); - [Operating System GATE 2022 Solved Questions](https://gargsacademy.com/operating-system-gate-2022-solved-questions/) - Ques 1: Consider the following threads, T1,T2 and T3 executing on a single processor, synchronized using three binary semaphore variables, S1,S2 and S3, operated upon using standard wait() and signal(). The threads can be context switched in any order and at any time. GATE 2022 Q no 19 Which initialization of the semaphores would print the sequence BCABCABCA…? (A) S1 = 1; S2 = 1; S3 = 1 - [Digital Logic GATE 2022 Solved Questions](https://gargsacademy.com/digital-logic-gate-2022-solved-questions/) - Ques 1: Let R1 and R2 be two 4–bit registers that store numbers in 2’s complement form. For the operation R1 + R2, which one of the following values of R1 and R2 gives an arithmetic overflow? GATE 2022 Q no 18 (A) R1 = 1011 and R2 = 1110 (B) R1 = 1100 and R2 = 1010 (C) R1 = 0011 and R2 = 0100 (D) R1 = 1001 and R2 = 1111 Ans: - [Computer Networks GATE 2018 Solved Questions](https://gargsacademy.com/computer-networks-gate-2018-solved-questions/) - Ques 1: Match the following: GATE 2018 Q no 13 (A) P-III, Q-IV, R-II, S-I (B) P-II, Q-I, R-IV, S-III (C) P-IV, Q-I, R-II, S-III (D) P-IV, Q-I, R-III, S-II Ans: (C) P-IV, Q-I, R-II, S-III Solution: UDP header - 16 bits MAC address: 48 bits IPv6 next header: 8 bits TCP Sequence No.: 32 bits Ques 2: Consider the following statements regarding - [DBMS GATE 2018 Solved Questions](https://gargsacademy.com/dbms-gate-2018-solved-questions/) - Ques 1:In an Entity-Relationship (ER) model, suppose R is a many-to-one relationship from entity set E1 to entity set E2. Assume that E1 and E2 participate totally in R and that the cardinality of E1 is greater than the cardinality of E2. GATE 2018 Q no 11 Which one of the following is true about R? (A) Every entity in - [Discrete Mathematics GATE 2018 Solved Questions](https://gargsacademy.com/discrete-mathematics-gate-2018-solved-questions/) - Ques 1: Which one of the following is a closed form expression for the generating function of the sequence {an}, here an = 2n+3 for all n=0,1,2,…? GATE 2018 Q No 1 (A) 3/(1−x)2 (B) 3x/(1−x)2 (C) (2−x)/(1−x)2 (D) (3-x)/(1−x)2 Ans: (D) (3-x)/(1−x)2 Solution: Ques 2: Two people, P and Q, decide to independently roll two identical dice, each with 6 faces, numbered 1 to 6. - [Computer Architecture GATE 2018 Solved Questions](https://gargsacademy.com/computer-architecture-gate-2018-solved-questions/) - Ques 1: Consider the following processor design characteristics. GATE 2018 Q no 5 I. Register-to-register arithmetic operations onlyII. Fixed-length instruction formatIII. Hardwired control unit Which of the characteristics above are used in the design of a RISC processor? (A) I and II only (B) II and III only (C) I and III only (D) I, - [Operating System GATE 2018 Solved Questions](https://gargsacademy.com/operating-system-gate-2018-solved-questions/) - Ques 1: Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the corresponding memory page is available in memory, and D units if the memory access causes a page fault. It has been experimentally measured that the average - [GATE CS/IT 2018](https://gargsacademy.com/gate-cs-it-2018/) - Graduate Aptitude Test in Engineering Date: 4th Feb 2018 General Aptitude (GA) Q.1 – Q.5 Carry ONE mark each. Q. 6 – Q. 10 Carry TWO marks each. Q 1. “From where are they bringing their books? ________ bringing _______ books from _____.” The words that best fill the blanks in the above sentence are - [Digital Logic GATE 2018 Solved Questions](https://gargsacademy.com/digital-logic-gate-2018-solved-questions/) - Ques 1: Let ⊕ and ⊙ denote the Exclusive OR and Exclusive NOR operations, respectively. GATE 2018 Q no 4 Which one of the following is NOT CORRECT? (A) (𝑃⊕Q)'= 𝑃 ⊙ 𝑄 (B) 𝑃' ⊕ 𝑄 = 𝑃 ⊙ 𝑄 (C) 𝑃̅'⊕ 𝑄' = 𝑃 ⊕ 𝑄 (D) (𝑃 ⊕ 𝑃') ⊕ 𝑄 = - [Implicants in K Map](https://gargsacademy.com/implicants-in-k-map/) - Implicants: Implicant is a product/minterm term in Sum of Products (SOP) or sum/maxterm term in Product of Sums (POS) of a Boolean function. Example: Consider a boolean function, F = AB + ABC + BC. Implicants are AB, ABC and BC. Prime Implicants – A group of square or rectangle made up of bunch of adjacent - [Programming GATE 2018 Solved Questions](https://gargsacademy.com/programming-gate-2018-solved-questions/) - Ques 1: Consider the following C program. GATE 2018 Q no 2 #include struct Ournode { char x,y,z; }; int main() { struct Ournode p = {'1', '0', 'a'+2}; struct Ournode *q = &p; printf ("%c, %c", *((char*)q+1), *((char*)q+2)); return 0; } The output of this program is: (A) 0, c (B) 0, a+2 - [Algorithm GATE 2018 Solved Questions](https://gargsacademy.com/algorithm-gate-2018-solved-questions/) - Ques 1:Assume that multiplying a matrix G1 of dimension 𝑝 × 𝑞 with another matrix G2 of dimension 𝑞 × 𝑟 requires 𝑝𝑞𝑟 scalar multiplications. Computing the product of n matrices G1G2G3…Gn can be done by parenthesizing in different ways. Define Gi Gi+1 as an explicitly computed pair for a given paranthesization if they are - [Data Structures GATE 2018 Solved Questions](https://gargsacademy.com/data-structures-gate-2018-solved-questions/) - Ques 1:A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let n denote the number of nodes in the queue. Let enqueue be implemented by inserting a new node at the head, and dequeue be implemented by deletion of - [Producer Consumer Problem in Operating System](https://gargsacademy.com/producer-consumer-problem-in-operating-system/) - The Producer-Consumer problem is a classic synchronization problem in operating systems. The problem is defined as follows: There is a fixed-size buffer and a Producer process, and a Consumer process. The Producer process creates an item and adds it to the shared buffer. The Consumer process takes items out of the shared buffer and “consumes” them. Certain conditions must be met - [Program to print Divisors of a number Using Function](https://gargsacademy.com/program-to-print-divisors-of-a-number/) - Logic: Divisor A number is called divisor of another no n if it divides the number completely i.e leaving the remainder 0Enter the number nExample : n=15We will check whether number is divisible by any number from 1 to n here 15.If it is divisible by any number (example 15 is divisible by 1, 3, - [Program to print sum of first n natural numbers using Function](https://gargsacademy.com/program-to-print-sum-of-first-n-natural-numbers-using-function/) - Logic: Enter the number nsum= 1 + 2+ 3 + 4 +........+n Algorithm Enter the number as nInitially assign sum=0for(i=1;i - [Program to print sum of squares of first n natural numbers using Function](https://gargsacademy.com/program-to-print-sum-of-squares-of-first-n-natural-numbers-using-function/) - Logic: Enter the number nsum= 12 + 22+ 32 + 4 2+........+n2 Algorithm Enter the number as nInitially assign sum=0for(i=1;i - [Program to print sum of cubes of first n natural numbers using Function](https://gargsacademy.com/program-to-print-sum-of-cubes-of-first-n-natural-numbers-using-function/) - Logic: Enter the number nsum= 13 + 23+ 33 + 43+........+n3 Algorithm Enter the number as nInitially assign sum=0for(i=1;i - [Program to print factorial/product of first n natural numbers using Function](https://gargsacademy.com/program-to-print-factorial-product-of-first-n-natural-numbers-using-function/) - Logic: Enter the number nProduct or Factorial= 1 x 2x 3 x 4 x.........x n Algorithm Enter the number as nInitially assign product=1for(i=1;i - [General Aptitude GATE CS/IT 2019](https://gargsacademy.com/general-aptitude-gate-cs-it-2019/) - Graduate Aptitude Test in Engineering Date: 3rd Feb 2019 General Aptitude (GA) Q.1 – Q.5 Carry ONE mark each. Q. 6 – Q. 10 Carry TWO marks each. Q 1. The expenditure on the project _____ as follows: equipment Rs.20 lakhs, salaries Rs.12 lakhs, and contingency Rs.3 lakhs. (A) break down (B) break (C) breaks - [General Aptitude GATE CS/IT 2020](https://gargsacademy.com/general-aptitude-gate-cs-it-2020/) - Graduate Aptitude Test in Engineering Date: 8th Feb 2020 General Aptitude (GA) Q.1 – Q.5 Carry ONE mark each. Q. 6 – Q. 10 Carry TWO marks each. Q1. Raman is confident of speaking English ______ six months, as he has been practising regularly____ the last three weeks. (A) during, for (B) for, since (C) - [General Aptitude GATE CS/IT 2022](https://gargsacademy.com/general-aptitude-gate-cs-it-2022/) - Graduate Aptitude Test in Engineering Date: 5th Feb 2022 Session: Morning General Aptitude (GA) Q.1 – Q.5 Carry ONE mark each. Q. 6 – Q. 10 Carry TWO marks each. Q.1 The _________ is too high for it to be considered _________. (A) fair / fare (B) faer / fair (C) fare / fare (D) - [General Aptitude GATE CS/IT 2021 Morning Session](https://gargsacademy.com/general-aptitude-gate-cs-it-2021-morning-session/) - Graduate Aptitude Test in Engineering Date: 13th Feb 2021 Session: Morning General Aptitude (GA) Q.1 – Q.5 Carry ONE mark each. Q. 6 – Q. 10 Carry TWO marks each. Q.1 The ratio of boys : girls in a class is 7:3. An acceptable value for the total no of students in the class is - [General Aptitude GATE CS/IT 2021 Evening Session](https://gargsacademy.com/general-aptitude-gate-cs-it-2021-evening-session/) - Graduate Aptitude Test in Engineering Date: 13th Feb 2021 Session: Evening General Aptitude (GA) Q.1 – Q.5 Carry ONE mark each. Q. 6 – Q. 10 Carry TWO marks each. Q.1 Gauri said that she can play the keyboard __________ her sister. (A) as well as (B) as better as (C) as nicest as (D) - [PL (PROGRAMMING LANGUAGES)](https://gargsacademy.com/pl-programming-languages/) - DCRUST SYLLABUS CSE323C PROGRAMMING LANGUAGES CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand the issues involved in programming language design and implementation.To have an in-depth understanding of functional, logic, and object-oriented programming paradigms.Understand design/implementation issues involved with variable allocation and binding, control flow, types, subroutines, parameter passing.To develop an understanding of the compilation and - [CG (COMPUTER GRAPHICS)](https://gargsacademy.com/cg-computer-graphics/) - DCRUST SYLLABUS CSE321C COMPUTER GRAPHICS CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To list the basics concepts used in computer graphics.To implement various algorithms to scan, convert the basic geometrical primitives, transformations, area filling, clipping.To describe the importance of viewing and projections.To design an application with the principles of virtual reality and understand a typical - [DBMS LAB (DATABASE MANAGEMENT SYSTEM LAB )](https://gargsacademy.com/dbms-lab-database-management-system-lab/) - DCRUST SYLLABUS CSE383C DATABASE MANAGEMENT SYSTEM LAB CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To have good knowledge of query formation using SQL.To have knowledge of Storage and access techniques of Data from Database.To be familiar with different functions used for data processing in DBMS List of hands-on experiments. 1. To study Data Definition language1.1. - [OOPs LAB  (OBJECT ORIENTED PROGRAMMING LAB)](https://gargsacademy.com/oops-lab-object-oriented-programming-lab/) - DCRUST SYLLABUS CSE381C OBJECT ORIENTED PROGRAMMING LAB CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To apply the basic knowledge of Object and classes.To implement features of Object oriented programming like inheritance, polymorphism, operator overloadingTo apply the concepts of exception handling and templates. List of hands-on experiments related to the course contents of CSE301C. Raising a - [SE (SOFTWARE ENGINEERING)](https://gargsacademy.com/se-software-engineering/) - DCRUST SYLLABUS CSE309C SOFTWARE ENGINEERING CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To enable students to apply a systematic application of scientific knowledge in creating and building cost effective software solutions to business and other types of problems.To make students understand different phases to make a software & study them in detail.To make students understand - [FLAT (FORMAL LANGUAGES & AUTOMATA THEORY)](https://gargsacademy.com/flat-formal-languages-automata-theory/) - DCRUST SYLLABUS CSE307C FORMAL LANGUAGES & AUTOMATA THEORY CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand the basic properties of formal languages and formal grammarsTo understand the basic properties of deterministic and nondeterministic finite automataTo understand the basic properties of Turing machines and computing with Turing machinesTo understand the concepts of tractability and decidability, - [CN (COMPUTER NETWORKS)](https://gargsacademy.com/cn-computer-networks/) - DCRUST SYLLABUS CSE305C COMPUTER NETWORKS CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To learn the concepts, vocabulary and techniques currently used in the area of computer networks.To understand the concepts of the OSI model and the TCP/IP model.To be familiar with wireless networking conceptsTo be familiar with contemporary issues in networking technologies. Unit I OSI - [DBMS (DATABASE MANAGEMENT SYSTEMS)](https://gargsacademy.com/dbms-database-management-systems/) - DCRUST SYLLABUS CSE303C DATABASE MANAGEMENT SYSTEMS CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand the different issues involved in the design and implementation of a database system.To study the physical and logical database designs, database modeling, relational, hierarchical, and network modelsTo understand and use data manipulation language to query, update, and manage a DatabaseTo - [OOP (OBJECT ORIENTED PROGRAMMING)](https://gargsacademy.com/oop-object-oriented-programming/) - DCRUST SYLLABUS CSE 301C OBJECT ORIENTED PROGRAMMING CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To familiarize students with basic concepts of object oriented programmingTo familiarize students with operator overloading, inheritance, virtual functions and friend functions.To familiarize students with advanced concepts of object oriented programming like templates and exception handling Unit I Basic Concepts Of Object - [Program to find sum of cubes of first n natural numbers using for loop](https://gargsacademy.com/program-to-find-sum-of-cubes-of-first-n-natural-numbers-using-for-loop/) - Logic: Enter the number nsum= 13 + 23+ 33 + 43+........+n3 Algorithm Enter the number as nInitially assign sum=0for(i=1;i - [Program to print sum of first n natural numbers using for loop](https://gargsacademy.com/program-to-print-sum-of-first-n-natural-numbers-using-for-loop/) - Logic: Enter the number nsum= 1 + 2+ 3 + 4 +........+n Algorithm Enter the number as nInitially assign sum=0for(i=1;i - [Program to print numbers from a to b using for loop](https://gargsacademy.com/program-to-print-numbers-from-a-to-b-using-for-loop/) - Program #include int main() { printf("****************************************************************"); printf("\n****************************************************************"); printf("\n** WAP to print numbers from a to b using for loop **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************************"); printf("\n****************************************************************\n"); int a, b, i; printf("enter a and b"); scanf("%d%d", &a, &b); if (a - [Program to print even numbers from 10 to 1 using for loop](https://gargsacademy.com/program-to-print-even-numbers-from-10-to-1-using-for-loop/) - Program #include int main() { printf("***********************************************************"); printf("\n***********************************************************"); printf("\n** WAP to print even numbers from 10 to 1 using for loop **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n***********************************************************"); printf("\n***********************************************************\n"); int i; printf("\nLogic 1\n"); for (i = 10; i >= 2; i = i - 2) printf("%d\t", - [Program to print even numbers from 1 to 10 using for loop](https://gargsacademy.com/program-to-print-even-numbers-from-1-to-10-using-for-loop/) - Program #include int main() { printf("****************************************************************"); printf("\n****************************************************************"); printf("\n** WAP to print even numbers from 1 to 10 using for loop **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************************"); printf("\n****************************************************************\n"); int i; printf("\nLogic 1\n"); for (i = 2; i - [Program to print weekday depending upon entered day number](https://gargsacademy.com/program-to-print-weekday-depending-upon-entered-day-number/) - Logic: Enter day numberWeekdays starts from MondayIf day number=1, weekday is MondayIf day number=2, weekday is TuesdayIf day number=3, weekday is WednesdayIf day number=4, weekday is ThursdayIf day number=5, weekday is FridayIf day number=6, weekday is SaturdayIf day number=7, weekday is SundayOtherwise, you have entered Wrong day number Algorithm Enter day number as dnoswitch (dno) - [Program to print name of month depending upon entered month number](https://gargsacademy.com/program-to-print-name-of-month-depending-upon-entered-month-number/) - Logic: Enter month numberMonth name starts from JanuaryIf month number=1, month is JanuaryIf month number=2, month is February and so onIf month number=12, month is DecemberOtherwise, you have entered Wrong month number Algorithm Enter month number as mnoswitch (mno) { case 1: printf("january"); break; case 2: printf("feburary"); break; case 3: printf("march"); break; case 4: printf("aprail"); - [Program to find area and circumference of circle based on choice in C](https://gargsacademy.com/program-to-find-area-and-circumference-of-circle-based-on-choice-in-c/) - Logic: Enter choice chEnter radius of circle as rIf ch=1, find area=pi * r * rif ch=2 find circumference = 2 * pi * rOtherwise print "Wrong Choice" Algorithm Enter choice chEnter radius of circle rif (ch == 1) { a = 3.14 * r * r; printf("the area of circle is %d \n", a); - [Program to tell the type of triangle based on its angles in C](https://gargsacademy.com/program-to-tell-the-type-of-triangle-based-on-its-angles-in-c/) - Logic: There are three types of triangle based on its anglesRight Angled Triangle: If any one angle is of 90.Obtuse Angled Triangle: If any one angle is greater than 90.Acute Angled Triangle: If all angles are less than 90. Algorithm Enter three angles as a,b,cif(a==90 ||b==90||c==90) printf("Triangle is right angle triangle\n"); else if (a>90 ||b>90 - [Program to tell the type of triangle based on its sides in C](https://gargsacademy.com/program-to-tell-the-type-of-triangle-based-on-its-sides-in-c/) - Logic: There are three types of triangle based on its sidesEquilateral Triangle: If all three sides are equalIsosceles Triangle: If any two sides are equalScalene: If all sides are distinct Algorithm Enter three sides as a,b,cif (a == b && b == c) printf("Triangle is equilateral\n"); else if (a == b || b == c - [Program to find roots of a quadratic equation in C](https://gargsacademy.com/program-to-find-roots-of-a-quadratic-equation-in-c/) - Logic: Find the discriminant as d = b*b-4*a*cIf d>0 The equation have real and unequal roots.if d=0 The equation have real and equal rootsif d0) printf("equation have real and unequal - [CD (COMPILER DESIGN)](https://gargsacademy.com/cd-compiler-design/) - DCRUST SYLLABUS CSE302C COMPILER DESIGN CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: Apply the knowledge of lex tool & yacc tool to develop a scanner & parser.Design and conduct experiments for Intermediate Code Generation in compiler.Develop program to solve complex problems in compilerLearn the new code optimization techniques to improve the performance of a program - [CD LAB (COMPILER DESIGN LAB)](https://gargsacademy.com/cd-lab-compiler-design-lab/) - DCRUST SYLLABUS CSE382C COMPILER DESIGN LAB CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To acquire knowledge in different phases and passes of Compiler.To use the Compiler tools like LEX, YACC, etc.To design different types of compiler tools to meet the requirements of the realistic constraints of compilers.To use Top-down and Bottom-up parsers. Construction of LL, - [ST (SOFTWARE TESTING)](https://gargsacademy.com/st-software-testing/) - DCRUST SYLLABUS CSE344C SOFTWARE TESTING CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To study fundamental concepts in software testing, including software testing objectives, process, criteria, strategies, and methods.To learn how to planning a test project, design test cases and data, conduct testing operations, manage software problems and defects, generate a testing report.To expose the advanced - [CS (CYBER SECURITY)](https://gargsacademy.com/cs-cyber-security/) - DCRUST SYLLABUS CSE431C CYBER SECURITY CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand cyber crime and its laws.To work with tools and methods used in cyber crime.To understand the life cycle of digital forensics.To learn and understand web threats, challenges and protection policies. Unit I Introduction To Cybercrime:- Cybercrime and Information Security, Classificationsof Cybercrimes, - [AJ (ADVANCED JAVA)](https://gargsacademy.com/aj-advanced-java/) - DCRUST SYLLABUS CSE328C ADVANCED JAVA CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To study the fundamental concepts of programming in Java including the designing of interactive applications.To learn the concepts of connecting with databases.To gain the insights of servlet concept.To understand the fundamental concepts of JSP. Unit I Introduction: Concepts of Classes and Objects, Constructors, - [CFCL (CYBER FORENSICS AND CYBER LAWS)](https://gargsacademy.com/cfcl-cyber-forensics-and-cyber-laws/) - DCRUST SYLLABUS CSEH403C CYBER FORENSICS AND CYBER LAWS CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To learn the overview of cybercrime. To learn the issues of cybercrime.To learn the various methods to investigate cybercrime and learn about digital forensics. To understand the laws and acts behind. Unit I Introduction: Overview of Cyber Crime, Nature and Scope of - [SDEC (SOFTWARE DESIGN AND ENTERPRISE COMPUTING)](https://gargsacademy.com/sdec-software-design-and-enterprise-computing/) - DCRUST SYLLABUS CSE405C SOFTWARE DESIGN AND ENTERPRISE COMPUTING CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To fix software flaws and bugs in various software.To make students aware of various issues like weak random number generation, information leakage, poor usability, and weak or no encryption on data traffic.To learn techniques for successfully implementing and supporting network - [AI (ARTIFICIAL INTELLIGENCE AND EXPERT SYSTEM)](https://gargsacademy.com/ai-artificial-intelligence-and-expert-system/) - DCRUST SYLLABUS CSE340C ARTIFICIAL INTELLIGENCE AND EXPERT SYSTEM CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand the basic concepts of AI and problem solvingTo analyze and formalize the problem as a state space, graph, design heuristics and select amongst different search techniques to solve themTo represent knowledge and draw inferencesTo explore learning techniques and - [MM (Multimedia Technology)](https://gargsacademy.com/mm-multimedia-technology/) - DCRUST SYLLABUS CSE441C MULTIMEDIA TECHNOLOGY CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand the characteristics of different multimedia systems.To identify the encoding and quantization mechanisms for images.To explore the audio and video processing mechanisms.To know the practical applications of multimedia systems. Unit I Basics of Multimedia Technology: Computers, communication and entertainment; multimedia an introduction; - [SPM (Software Project Management)](https://gargsacademy.com/spm-software-project-management/) - DCRUST SYLLABUS CSE404C SOFTWARE PROJECT MANAGEMENT CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To explain needs for software specifications and to study different types of software requirements gathering techniques.To convert the requirements model into the design model and demonstrate use of software and user interface design principles.To justify the role of SDLC in Software Project - [ACA (Advanced Computer Architecture)](https://gargsacademy.com/aca-advanced-computer-architecture/) - DCRUST SYLLABUS CSE401C ADVANCED COMPUTER ARCHITECTURE CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To learn the concept of modern computers along-with performance analysis measures.To understand the architectures of various processor types of processors.To explore the paradigms of memory organization.To understand the concepts of parallelization techniques for processing of instructions. Unit I Introduction: Elements of modern - [OS LAB (Operating System LAB)](https://gargsacademy.com/os-lab-operating-system-lab/) - DCRUST SYLLABUS CSE 284C OPERATING SYSTEMS LAB CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand the concepts of operating system, features, advantage and disadvantage of different OS.To demonstrate the Process scheduling algorithms in OS.To understand the Windows and Linux administration.To work in shell environment. List of Practicals: Study of WINDOWS 2000 Operating System.Administration of - [WIT (Web and Internet Technology)](https://gargsacademy.com/wit-web-and-internet-technology/) - DCRUST SYLLABUS CSE 202 C Web and Internet Technologies) CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand the role of HTML, CSS, XML, JavaScript and protocols in the workings of web and web applications.To design a responsive web site using HTML5 and CSS.To build Dynamic web site using server side PHP Programming and Database - [OS (Operating System)](https://gargsacademy.com/os-operating-system/) - DCRUST SYLLABUS CSE 204C OPERATING SYSTEMS CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To understand the mechanisms of OS to handle processes and threads and their communication.To understand the process management mechanisms and scheduling algorithms.To understand the mechanisms involved in memory management in OS and virtual memory concepts.To understand the file management and deadlocks handling - [WIT (Web and Internet Technology) LAB](https://gargsacademy.com/wit-web-and-internet-technology-lab/) - DCRUST SYLLABUS CSE 282 C Web and Internet Technologies LAB) CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To develop web pages using mark up languages like HTML, DHTML and style sheets for making it more presentable to the user.To develop dynamic web pages using client side programming and server side programming.To develop interactive web applications - [WAP to explain Call by Value Method of Function Call](https://gargsacademy.com/wap-to-explain-call-by-value-method-of-function-call/) - Program #include void change(int a, int b) { int t=a; a = b; b = a; printf("\nIn the Function Values are changed"); printf("\na= %d and b= %d", a, b); } int main() { printf("***************************************************************"); printf("\n***************************************************************"); printf("\n** WAP to explain Call by Value Method **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); - [ITW (IT Workshop) / MATLAB](https://gargsacademy.com/itw-it-workshop-matlab/) - DCRUST SYLLABUS CSE 205 C INFORMATION TECHNOLOGY LAB CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To study MATLAB for programming purposesTo learn and explore MATLAB programming constructs.To introduce Arrays for matrices representation and Graphics for fractals.To write and debug the code written in MATLAB Unit I Introduction: Data types and variables: Introduction to MATLAB, Data - [DSA (Data Structure and Algorithms)](https://gargsacademy.com/dsa-data-structure-and-algorithms/) - DCRUST SYLLABUS CSE 201 C Data Structure and Algorithms CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To analyse algorithms in terms of time, space and computational complexities.To learn searching algorithms (Linear Search and Binary search) and implement them.To study Stacks, Queues, Linked lists, Graph search and traversal techniques. To study sorting algorithms i.e. Selection Sort, Bubble - [PPS (Programming for Problem Solving) using C](https://gargsacademy.com/pps-programming-for-problem-solving-using-c/) - B. Tech. Semester – I/II (Common to all Branches) DCRUST SYLLABUS CSE 101C PROGRAMMING FOR PROBLEM SOLVING CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To make students understand basics of parts of computers and the programming.To give knowledge of basic constructs of computer programming.To make students understand Recursion.To impart knowledge of Basic Algorithms. Unit I - [Program to enter 3 angles & check whether a triangle is possible or not in C](https://gargsacademy.com/program-to-enter-3-angles-check-whether-a-triangle-is-possible-or-not-in-c/) - Logic: A triangle is possible only if, sum of all three angles is 180 Algorithm Enter angles of triangle as a,b,cs = a+b+c; if(s==180) printf("triangle is possible"); else printf("triangle is not possible"); Program #include int main() { printf("*************************************************************"); printf("\n*************************************************************"); printf("\n** WAP to enter 3 angles & check if a triangle is possible**"); printf("\n** Created - [Program to enter 3 sides & check whether a triangle is possible or not in C](https://gargsacademy.com/program-to-enter-3-sides-check-whether-a-triangle-is-possible-or-not-in-c/) - Logic: A triangle is possible only if, sum of any two sides is greater than third side. Algorithm Enter sides of triangle as a,b,cs = a+b; if(s>c) printf("triangle is possible\n"); else printf("triangle is not possible"); Program #include int main() { printf("*************************************************************"); printf("\n*************************************************************"); printf("\n** WAP to enter 3 sides & check if a triangle is - [Program to convert temperature from farenheit to celcius or vice versa in C](https://gargsacademy.com/program-to-convert-temperature-from-farenheit-to-celcius-or-vice-versa-in-c/) - Logic: Formula for temperature conversion is:C=(F-32)*5/9F=9/5 * C +32 Algorithm Enter choice chif (ch == 1){printf("enter the value of temperature in Celcius\n");scanf("%f", &celcius);f = (celcius * 9 / 5) + 32;printf("the value of temperature in fahrenheit is %f", f);}else{printf("enter the value of temperature in fahrenheit\n");scanf("%f", &f);celcius = (f - 32) * 5 / 9;printf("the value - [Program to calculate discount based on bill of items purchased in C](https://gargsacademy.com/program-to-calculate-discount-based-on-bill-of-items-purchased-in-c/) - Program #include int main() { printf("*******************************************"); printf("\n*******************************************"); printf("\n**WAP to calculate discount based on bill**"); printf("\n** using if else if laddar **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*******************************************"); printf("\n*******************************************\n"); float price, quan, dis, bill, netpay; printf("enter quantity and price"); scanf("%f%f",&quan, &price); bill = quan*price; if(bill - [Program to check whether a number is even or odd in C](https://gargsacademy.com/program-to-check-whether-a-number-is-even-or-odd-in-c/) - Even Number A number is even if it is divisibly by 2 i.e leaves remainder as 0 when it is divided by 2 Odd Number A number is odd if it is not divisibly by 2 i.e leaves remainder as 1 when it is divided by 2 Logic: Enter the number as nFind the remainder - [Program to find total, percentage and grade of a student in C](https://gargsacademy.com/program-to-find-total-percentage-and-grade-of-a-student-in-c/) - Program #include int main() { int phy, chem, bio, math, comp; float per; printf("**********************************************************"); printf("\n**********************************************************"); printf("\n**WAP to find total percentage & grade of a student in C**"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**********************************************************"); printf("\n**********************************************************"); /* Input marks of five subjects from user */ printf("\nEnter five - [Program to swap two numbers with/without using temporary variable](https://gargsacademy.com/program-to-swap-two-numbers-with-without-using-temporary-variable/) - Program #include int main() { printf("************************************************************"); printf("\n************************************************************"); printf("\n**WAP to Swap two no with/without using temporary variable**"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************\n"); int a,b,temp; printf("\nEnter two numbers : "); scanf("%d%d",&a,&b); printf("\nNUmbers before Swapping are a= %d and b=%d\n",a,b); printf("\nUsing temporary variable"); temp=a; a=b; b=temp; - [Program to find minimum of elements of an array](https://gargsacademy.com/program-to-find-minimum-of-elements-of-an-array/) - Program (Without Using Function) #include int main() { printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP to find minimum element from an array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************\n"); int n, i, a[10], min; printf("Enter no. of elements in the array\n"); scanf("%d", &n); printf("enter array elements"); for - [Program to find maximum of elements of an array](https://gargsacademy.com/program-to-find-maximum-of-elements-of-an-array/) - Program(Without Using Function) #include int main() { printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP to find maximum element from an array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************\n"); int n, i, a[10], max; printf("Enter no. of elements in the array\n"); scanf("%d", &n); printf("enter array elements"); for (i - [Program to find maximum and minimum of three numbers in C](https://gargsacademy.com/program-to-find-maximum-and-minimum-of-three-numbers-in-c/) - Program Logic 1 #include int main() { int a,b,c,max,min; printf("************************************************************"); printf("\n************************************************************"); printf("\n** WAP to find maximum and minimum of three numbers in C **"); printf("\n** using if else if laddar **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************"); printf("\nenter three numbers"); scanf("%d%d%d",&a,&b,&c); if(a>b && a>c) max=a; - [COA (Computer Organisation and Architecture](https://gargsacademy.com/coa-computer-organisation-and-architecture/) - DCRUST SYLLABUS CSE 203 C Computer Organisation and architecture CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To study functional blocks of a computer and their working.To learn CPU organization along with Instruction Level Architecture, different addressing modes and pipelining.To learn about I/O devices and their working principles.The understand the current state of art in memory - [DAA (Design and Analysis of Algorithms)](https://gargsacademy.com/daa-design-and-analysis-of-algorithms/) - DCRUST SYLLABUS CSE 206C Design and Analysis of Algorithms CATEGORY : ENGINEERING SCIENCE COURSE Course Objectives: To analyze worst-case running times of algorithms based on asymptotic analysis and justify the correctness of algorithms.To apply the algorithms and design techniques to solve problems.To explain the major graph algorithms and their analyses and to employ graphs to - [Program to find Minimum Spanning Tree MST of a graph using Prim's Algorithm in C](https://gargsacademy.com/program-to-find-minimum-spanning-tree-mst-of-a-graph-using-prims-algorithm-in-c/) - Program // Prim's Algorithm in C #include #include #define INF 9999999 // number of vertices in graph #define V 5 // create a 2d array of size 5x5 // for adjacency matrix to represent graph int G[V][V] = { {0, INF, 75, 0, 0}, {9, 0, 95, 19, 42}, {75, 95, 0, 51, - [Program for Travelling Salesman Problem in C](https://gargsacademy.com/program-for-travelling-salesman-problem-in-c/) - Program #include #include int s, c[100][100], ver; float optimum = 999, sum; /* function to swap array elements */ void swap(int v[], int i, int j) { int t; t = v[i]; v[i] = v[j]; v[j] = t; } /* recursive function to generate permutations */ void brute_force(int v[], int n, int i) - [Program for Sum of Subset Problem in C](https://gargsacademy.com/program-for-sum-of-subset-problem-in-c/) - Program #include #include void subset(int, int, int); int x[10], w[10], d, count = 0; void main() { int i, n, sum = 0; printf("\n*********************************************************"); printf("\n*********************************************************"); printf("\n** Program for Sum of Subset Problem in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*********************************************************"); printf("\n*********************************************************"); printf("\nEnter the - [Program to find Minimum Spanning Tree MST of a graph using Kruskal's Algorithm in C](https://gargsacademy.com/program-to-find-minimum-spanning-tree-mst-of-a-graph-using-kruskals-algorithm-in-c/) - Program #include #include int ne = 1, min_cost = 0; void main() { int n, i, j, min, a, u, b, v, cost[20][20], parent[20]; printf("****************************************************************"); printf("\n****************************************************************"); printf("\n** WAP to find Minimum Spanning Tree MST of a graph **"); printf("\n** using Kruskal's Algorithm in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant - [Program to find shortest path from a single source to all nodes using Dijikstra's Algorithm](https://gargsacademy.com/program-to-find-shortest-path-from-a-single-source-to-all-nodes-using-dijikstras-algorithm/) - Program #include #include void dij(int, int[20][20], int[20], int[20], int); void main() { int i, j, n, visited[20], source, cost[20][20], d[20]; printf("****************************************************************"); printf("\n****************************************************************"); printf("\n** WAP to find shortest path from a single source to all nodes**"); printf("\n** using Dijikstra's Algorithm in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** - [Program Breadth First Search in C](https://gargsacademy.com/program-breadth-first-search-in-c/) - Program #include #include void BFS(int[20][20], int, int[20], int); void main() { int n, a[20][20], i, j, visited[20], source; printf("****************************************************************"); printf("\n****************************************************************"); printf("\n** Program for Breadth First Search in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************************"); printf("\n****************************************************************"); printf("\nEnter the number of vertices:"); scanf("%d", &n); printf("\nEnter - [Program for N Queen Problem in C](https://gargsacademy.com/program-for-n-queen-problem-in-c/) - Program #define N 4 #include #include void printSolution(int board[N][N]) { for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) printf(" %d ", board[i][j]); printf("\n"); } } bool isSafe(int board[N][N], int row, int col) { int i, j; for (i = 0; i - [Program to implement 0/1 knapsack problem in C](https://gargsacademy.com/program-to-implement-0-1-knapsack-problem-in-c/) - Program #include #include #define MAX 50 int p[MAX], w[MAX], n; int knapsack(int, int); int max(int, int); void main() { int m, i, optsoln; printf("*********************************************************"); printf("\n*********************************************************"); printf("\n** WAP to implement 0/1 knapsack problem in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*********************************************************"); printf("\n*********************************************************"); printf("\nEnter no. - [Program to find transitive closure of a graph in C](https://gargsacademy.com/program-to-find-transitive-closure-of-a-graph-in-c/) - Program #include #include void warshall(int[10][10], int); void main() { int a[10][10], i, j, n; printf("*********************************************************"); printf("\n*********************************************************"); printf("\n** WAP to find transitive closure of a graph in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*********************************************************"); printf("\n*********************************************************"); printf("\nEnter the number of nodes:"); scanf("%d", &n); printf("\nEnter the - [Program to find topological sorting of a graph in C](https://gargsacademy.com/program-to-find-topological-sorting-of-a-graph-in-c/) - Program #include #include void findIndegree(int[10][10], int[10], int); void topological(int, int[10][10]); void main() { int a[10][10], i, j, n; printf("*********************************************************"); printf("\n*********************************************************"); printf("\n** WAP to find topological sorting of a graph in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*********************************************************"); printf("\n*********************************************************"); printf("\nEnter the number of nodes:"); scanf("%d", - [Program to find all pairs shortest path using Floyd's Algorithm](https://gargsacademy.com/program-to-find-all-pairs-shortest-path-using-floyds-algorithm/) - Program #include #include void floyd(int [10][10], int); int min(int, int); void main() { int n, a[10][10], i, j; printf("****************************************************************"); printf("\n****************************************************************"); printf("\n** WAP to find shortest path between any two pairs of nodes **"); printf("\n** using Floyd Warshall's Algorithm in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone - [Program to check whether a graph is connected or not using DFS method](https://gargsacademy.com/program-to-check-whether-a-graph-is-connected-or-not-using-dfs-method/) - Program: #include void DFS(int[20][20], int, int[20], int); int main() { int n, a[20][20], i, j, visited[20], source; printf("****************************************************************"); printf("\n****************************************************************"); printf("\n** Program for Depth First Search in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************************"); printf("\n****************************************************************"); printf("\nEnter the number of vertices: "); scanf("%d", &n); printf("\nEnter the adjacency - [Program to concatenate one string into another string](https://gargsacademy.com/program-to-concatenate-one-string-into-another-string/) - Program #include #include int main() { char str1[20],str2[20],str3[40]; int len; printf("************************************************************"); printf("\n************************************************************"); printf("\n** WAP to concatenate one string into another string **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************"); printf("\nenter the string1\n"); gets(str1); printf("\nenter the string2\n"); gets(str2); strcpy(str3,str1); strcat(str3,str2); printf("\nConcatenated string is %s", str3); } - [Program to compare two strings](https://gargsacademy.com/program-to-compare-two-strings/) - Program #include #include int main() { char str1[20],str2[20],str3[40]; int len; printf("************************************************************"); printf("\n************************************************************"); printf("\n** WAP to compare two strings **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************"); printf("\nenter the string1\n"); gets(str1); printf("\nenter the string2\n"); gets(str2); if(strcmp(str1,str2)==0) printf("\nBoth Strings are Equal"); else printf("\nStrings are not Equal"); } - [Program to check whether a year is leap year or not in C](https://gargsacademy.com/program-to-check-whether-a-year-is-leap-year-or-not-in-c/) - Program #include int main() { int year; printf("************************************************************"); printf("\n************************************************************"); printf("\n** WAP to check whether a year is leap year or not in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************"); printf("\nenter the year\n"); scanf("%d", &year); if (year % 100 == 0) { if (year - [Program to find the length of a string in C](https://gargsacademy.com/program-to-find-the-length-of-a-string-in-c/) - Program #include #include int main() { char str[20]; int len; printf("************************************************************"); printf("\n************************************************************"); printf("\n** WAP to enter a string and find its length in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************"); printf("\nenter the string\n"); gets(str); len = strlen(str); printf("\nLength of the string is %d", - [Progarm to copy contents of a string into another string in C](https://gargsacademy.com/progarm-to-copy-contents-of-a-string-into-another-string-in-c/) - Program #include #include int main() { char str1[20],str2[20]; int len; printf("************************************************************"); printf("\n************************************************************"); printf("\n** WAP to copy contents of a string into another string **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************"); printf("\nenter the string\n"); gets(str1); strcpy(str2,str1); printf("\nAnother Copy of the string is %s", str2); } - [Storage Devices](https://gargsacademy.com/storage-devices/) - These devices are used to store the data permanent for future use. For example – Hard disk, CD, Pen drive, SD card Hard diskHard disk are flat circular plates made of aluminum or glass and coated with a magnetic material. Hard disks for personal computers can store terabytes information. Data are stored on their surfaces - [Output Devices](https://gargsacademy.com/output-devices/) - An output device is a computer hardware that gives us the output. It receives data from a computer and then translates that data into another form, like audio, visual, textual, or hard copy such as a printing the document on a page. Monitor It is used to display the output on the screen as soft - [Components of a Computer System](https://gargsacademy.com/components-of-a-computer-system/) - Definition, Full form and Block Diagram of parts of a Computer System Input Devices Output Devices Storage Devices - [Input Devices](https://gargsacademy.com/input-devices/) - These devices are responsible for giving the input to the computer system with the help of input devices. Examples of input devices: Keyboard, Mouse, Joystick, Web Camera, Microphone, Track ball, light pen, Digitizing tablet, OMR, OCR, MICR, BCR. Keyboard- It is an input device used for typing to enter textual input to the computer. Standard - [Operating System](https://gargsacademy.com/operating-system/) - It acts as an intermediate between the hardware and the user . It makes our computer system operational. Types of Operating System: CUI (Character User Inteface): In this operating system we used to interact by writing the commands in the form of characters .Examples of CUI : MSDOS ( MicroSoft Disk Operating System ). It - [Introduction to C Language](https://gargsacademy.com/introduction-to-c-language/) - What is language? A medium/way of interaction between any two communicating devices/persons. Example: Hindi, English etc. Computer Language: A medium/way of interaction between users/people and computers/smart devices. Example: C , C++, Java, Python etc. With a computer language, we are able to tell computers what to do, how to do, when to do etc. What - [Types of Errors in C language](https://gargsacademy.com/types-of-errors-in-c-language/) - Error/Bug: Error is a mistake/bug in the program which makes the behavior of the program abnormal. So, the errors must be removed from the program for the successful execution of the program. Programming errors are also known as the bugs. These errors are detected either during the time of compilation or execution. Debugging: The process - [Algorithm](https://gargsacademy.com/algorithm/) - It is step by step procedure to solve any problem. Characteristics of an algorithm: All the steps of an algorithm must be executed in sequence to obtain the output. An algorithm must terminate after a finite number of steps.It may take zero or more inputs.It must give at least one output. Algo: Find area and - [Discrete Mathematics Graph Theory GATE Previous Years Solved Questions](https://gargsacademy.com/discrete-mathematics-graph-theory-gate-previous-years-solved-questions/) - Ques 1: A graph is planar if and only if, GATE 1990 (A) It does not contain subgraphs homeomorphic to k5 and k3,3 (B) It does not contain subgraphs isomorphic to k5 or k3,3 (C) It does not contain subgraphs isomorphic to k5 and k3,3 (D) It does not contain subgraphs homeomorphic to k5 or k3,3 Ans: (D) It does not contain subgraphs homeomorphic to k5 or k3,3 Solution: Kuratowski's - [Precedence and Associativity of Operators](https://gargsacademy.com/precedence-and-associativity-of-operators/) - Precedence: It gives the order of execution of opertaors in an expression i.e. gives an idea about which operator is to be executed first when there are multiple operators in an expression. Example: The expression 4+3 * 2 can be solved by two ways. But only way1 is correct Way 1) 4+3 * 2 =4+6 - [PSEUDOCODE](https://gargsacademy.com/pseudocode/) - The algorithm written in any language is called pseudocode. It can be written in any human language or computer language. It is user as well as computer language friendly. It can be written in english language using some phrases of specific computer programming language like C, following the syntaxes of the C language. Pseudocode differs - [FLOWCHART](https://gargsacademy.com/flowchart/) - It is a pictorial representation of an algorithm for better understanding of code visually. They use rectangles, ovals, diamonds and other shapes to define the type of step, along with connecting arrows to define flow and sequence. Symbols Used in Flowcharts: There are different types of boxes that are used to make flowcharts. All the - [HSSC PGT Computer Science Solution of Question Paper March 2016](https://gargsacademy.com/hssc-pgt-computer-science-solution-of-question-paper-march-2016/) - Ans 1: (C) 16 years Solution: Let 1 year before their ages were 4x and 3x Now their ages are 4x+1 and 3x +1 After 1 year, their ages will be 4x+2 and 3x +2 Given : (4x+2)/(3x+2)=5/4 4(4x+2)=5(3x+2) 16x + 8= 15 x+ 10 16x-15x=10-8 x=2 present ages: 4x+1 and 3x+1 are (4(2) +1 - [Program to find maximum and minimum of two numbers in C](https://gargsacademy.com/program-to-find-maximum-and-minimum-of-two-numbers-in-c/) - Program #include int main() { int a,b,max,min ; printf("*********************************************************"); printf("\n*********************************************************"); printf("\n** WAP to find maximum and minimum of two numbers in C **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*********************************************************"); printf("\n*********************************************************"); printf("\nenter two numbers"); scanf("%d%d",&a,&b); if(a>b) max=a; else max=b; printf("maximum is %d",max); if(a - [Program to find curved and total surface area and volume of a cylinder in C](https://gargsacademy.com/program-to-find-curved-and-total-surface-area-and-volume-of-a-cylinder-in-c/) - Program #include int main() { float r, h, tsa, csa, v; printf("******************************************************************"); printf("\n******************************************************************"); printf("\n** WAP to find curved & total surface area & volume of cylinder **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n******************************************************************"); printf("\n******************************************************************"); printf("\nenter radius and height of cylinder"); scanf("%f%f", &r, &h); tsa = - [Progarm to find curved and total surface area and volume of a cone in C](https://gargsacademy.com/progarm-to-find-curved-and-total-surface-area-and-volume-of-a-cone-in-c/) - Program #include int main() { float r,h,l,tsa,csa,v; printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP to find curved & total surface area & volume of cone **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************"); printf("\nenter radius and height and slant height of cone"); scanf("%f%f%f",&r,&h,&l); tsa=3.14*r*r+r*l; csa=3.14*r*l; v=3.14*.33*r*r*h; printf("total surface - [Progarm to find area and volume of a sphere in C](https://gargsacademy.com/progarm-to-find-area-and-volume-of-a-sphere-in-c/) - Program #include int main() { float r,v,a; printf("*************************************************"); printf("\n*************************************************"); printf("\n** WAP to find area and volume of a sphere **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*************************************************"); printf("\n*************************************************"); printf("\nenter radius of sphere"); scanf("%f",&r); v= 1.33*3.14*r*r*r; a=4*3.14*r*r; printf("area is : %f\n",a); printf("volume is : %f\n",v); return 0; - [Program to find area and circumference of a circle in C](https://gargsacademy.com/program-to-find-area-and-circumference-of-a-circle-in-c/) - Program #include int main() { float r,a,c; printf("**********************************************************"); printf("\n**********************************************************"); printf("\n** WAP to find area and circumference of a circle **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**********************************************************"); printf("\n**********************************************************"); printf("\nenter the radius of circle \n "); scanf("%f",&r); a = 3.14*r*r; printf("the area of circle is %f \n",a); c - [Program to find average of elements of a 2D array](https://gargsacademy.com/program-to-find-average-of-elements-of-a-2d-array/) - Program #include int main() { printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to find average of elements of a 2D array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************"); printf("\n****************************************************\n"); int m, n, i, j, a[5][5]; float avg, sum = 0; printf("Enter no. of rows and columns in the - [Program to find product of elements of a 2D array](https://gargsacademy.com/program-to-find-product-of-elements-of-a-2d-array/) - Program #include int main() { printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to find product of elements of a 2D array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************"); printf("\n****************************************************\n"); int m, n, i, j, a[5][5], p = 1; printf("Enter no. of rows and columns in the array\n"); scanf("%d%d", - [Program to find sum of elements of a 2D array](https://gargsacademy.com/program-to-find-sum-of-elements-of-a-2d-array/) - Program #include int main() { printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to find sum of elements of a 2D array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************"); printf("\n****************************************************\n"); int m, n, i, j, a[5][5],sum=0; printf("Enter no. of rows and columns in the array\n"); scanf("%d%d", &m, &n); printf("enter - [Program to enter and display elements of a 2D array](https://gargsacademy.com/program-to-enter-and-display-elements-of-a-2d-array/) - Program #include int main() { printf("****************************************************"); printf("\n****************************************************"); printf("\n** WAP to enter and display a 2D array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n****************************************************"); printf("\n****************************************************\n"); int m, n, i, j, a[5][5]; printf("Enter no. of rows and columns in the array\n"); scanf("%d%d", &m, &n); printf("enter array elements"); - [Program to sort the elements of an array using quicksort](https://gargsacademy.com/program-to-sort-the-elements-of-an-array-using-quicksort/) - Program #include #include void Exch(int *p, int *q) { int temp = *p; *p = *q; *q = temp; } void QuickSort(int a[], int low, int high) { int i, j, key; key = low; i = low; j = high; if (low >= high) return; while (!(i == j && i == - [Program to enter a character and tell its type vowel or consonant in C](https://gargsacademy.com/program-to-enter-a-character-and-tell-its-type-vowel-or-consonant-in-c/) - Logic: Enter character chA character is vowel only if it is any one of the characters a, e, i, o, u, A, E, I, O, UOtherwise It is a consonant Algorithm Enter charcater chswitch (ch) { case 'a' : case 'A' : case 'e' : case 'E' : case 'i' : case 'I' : case - [Program to print numbers 1 to 10 using for, while and do while loop](https://gargsacademy.com/program-to-print-numbers-1-to-10-using-for-while-and-do-while-loop/) - Program #include int main() { printf("******************************************************"); printf("\n******************************************************"); printf("\n** WAP to print numbers 1 to 10 using loops **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n******************************************************"); printf("\n******************************************************\n"); int i; printf("\nUsing For loop\n"); for (i = 1; i - [Program to print numbers 10 to 1 using for, while and do while loop](https://gargsacademy.com/program-to-print-numbers-10-to-1-using-for-while-and-do-while-loop/) - Program #include int main() { printf("*********************************************************"); printf("\n*********************************************************"); printf("\n** WAP to print numbers 10 to 1 using loops **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n*********************************************************"); printf("\n*********************************************************\n"); int i; printf("\nUsing For loop\n"); for (i = 10; i >= 1; i--) printf("%d\t", i); printf("\n\nUsing while loop\n"); i = - [Program to find sum of squares of first n natural numbers using for loop](https://gargsacademy.com/program-to-find-sum-of-squares-of-first-n-natural-numbers-using-for-loop/) - Logic: Enter the number nsum= 12 + 22+ 32 + 4 2+........+n2 Algorithm Enter the number as nInitially assign sum=0for(i=1;i - [Program to find reverse of a number in C](https://gargsacademy.com/program-to-find-reverse-of-a-number-in-c/) - Logic: Enter the number n example n=345Reverse=543 Algorithm Enter the number as nInitially assign rev=0while(n>0){r=n%10; rev = rev * 10 + r;n=n/10;}Print rev Program #include int main() { printf("***************************************************************"); printf("\n***************************************************************"); printf("\n** WAP to find reverse of a number *"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n***************************************************************"); printf("\n***************************************************************\n"); - [Program to check a number for palindrome in C](https://gargsacademy.com/program-to-check-a-number-for-palindrome-in-c/) - Logic: Palindrome: A number is palindrome if it is equal to its reverse.Enter the number n Example 1: n=345Reverse=543Number is not equal to its reverse.So it is not palindromeExample 2: n=121Reverse=121Number is equal to its reverse.So it is palindrome Algorithm Enter the number as nCopy the number n into a temporary variable, say, noFirst find - [Program to check whether a number is perfect or not in C](https://gargsacademy.com/program-to-check-whether-a-number-is-perfect-or-not-in-c/) - Logic: Perfect Number A number is perfect if sum of its divisors other than the number is the number itself.Enter the number nExample 1: n=6We will check whether number is divisible by any number from 1 to n-1 here 5.6 is divisibly by 1,2,3 (Don't include number itself ie. 6 in its divisors)sum=1 + 2 - [Program to check whether a number is an armstrong number or not in C](https://gargsacademy.com/program-to-check-whether-a-number-is-an-armstrong-number-or-not-in-c/) - Logic: Armstrong Number A number is an armstrong number if the sum of cubes of its digits is equal to the number itself.Enter the number nExample 1: n=153Digits= 1, 5, 3sum of cubes of digits =1 + 125 + 27 =153=number itselfSo It is an armstrong numberExample 2: n=135Digits= 1, 3, 5sum of cubes of - [Program to find sum of elements of an array](https://gargsacademy.com/program-to-find-sum-of-elements-of-an-array/) - Program #include int main() { printf("**************************************************************"); printf("\n**************************************************************"); printf("\n** WAP to find sum of elements of an array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**************************************************************"); printf("\n**************************************************************\n"); int n,i,a[5],sum=0; printf("Enter no. of elements in the array\n"); scanf("%d",&n); printf("enter array elements"); for(i=0;i - [Program to find product of elements of an array](https://gargsacademy.com/program-to-find-product-of-elements-of-an-array/) - Program #include int main() { printf("***********************************************************"); printf("\n************************************************************"); printf("\n** WAP to find Product of elements of an array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************\n"); int n,i,a[5],prod=1; printf("Enter no. of elements in the arrayn"); scanf("%d",&n); printf("enter array elements"); for(i=0;i - [Program to find average of elements of an array](https://gargsacademy.com/program-to-find-average-of-elements-of-an-array/) - Program #include int main() { printf("************************************************************"); printf("\n************************************************************"); printf("\n** WAP to find average of elements of an array **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n************************************************************"); printf("\n************************************************************\n"); int n,i,a[5]; float sum=0,avg; printf("Enter no. of elements in the arrayn"); scanf("%d",&n); printf("enter array elements"); for(i=0;i - [Computer Networks ISO/OSI Stack and SWP GATE Previous Year Solved Questions](https://gargsacademy.com/computer-networks-iso-osi-stack-and-swp-gate-previous-year-solved-questions/) - Ques 1: Host A is sending data to host B over a full duplex link. A and B are using the sliding window protocol for flow control. The send and receive window sizes are 5 packets each. Data packets (sent only from A to B) are all 1000 bytes long and the transmission time for - [Discrete Mathematics Probability GATE Previous Year Solved Questions](https://gargsacademy.com/discrete-mathematics-probability-gate-previous-year-solved-questions/) - Ques 1: Consider Guwahati, (G) and Delhi (D)whose temperatures can be classified as high (H), medium (M) and low (L). Let P(HG) denote the probability that Guwahati has high temperature. Similarly, P(MG) and P(LG)denotes the probability of Guwahati having medium and low temperatures respectively. Similarly, we use P(HD),P(MD) and P(LD) for Delhi. GATE 2018 The following table gives the conditional probabilities for Delhi’s temperature given Guwahati’s temperature. Consider the first - [Discrete Mathematics Combinatories GATE Previous Years Solved Questions](https://gargsacademy.com/discrete-mathematics-combinatories-gate-previous-years-solved-questions/) - Ques 1: How many substrings (of all lengths inclusive) can be formed from a character string of length n? GATE 1989 Ans: 1+[n(n+1)/2] Solution: Lets take an example . Lets consider the given string is {GATE}. So, set of string of length 1={G,A,T,E} cardinality of set =4 Set of strings of length 2={GA,AT,TE}. Set of strings of length 3={GAT,ATE}. Set of strings - [Discrete Mathematics Set Theory and Algebra Previous Year GATE Questions](https://gargsacademy.com/discrete-mathematics-set-theory-and-algebra-previous-year-gate-questions/) - Ques 1: State whether the following statements are TRUE or FALSE: GATE 1987 The union of two equivalence relations is also an equivalence relation. Solution: Equivalence Relation: Relation is reflexive, symmetric, transitive. A relation R1 is defined on a set A={a,b,c}. R1={(a,a),(b,b),(c,c),(a,b),(b,a)} → Equivalence Relation. A relation R2 is defined on a set A={a,b,c}. R2={(a,a),(b,b),(c,c),(c,b),(b,c)} - [Digital Logic : Logic Functions and Minimisation GATE Previous Years Questions Solved](https://gargsacademy.com/digital-logic-logic-functions-and-minimisation-gate-previous-years-questions-solved/) - Ques 1: What is the equivalent Boolean expression in product-of-sums form for the Karnaugh map given below. GATE 1996 (A) BD’ + B’D(B) (B+C’+D)(B’+C+D’)(C) (B+D)(B’+D’)(D) (B+D’)(B’+D) Ans:(C) Solution: For POS Form, Consider 0 s and k-map is Ques 2: Let * be defined as x*y= x'+y. Let z = x*y. Value of z*x is GATE 1997 (A) x +y - [Algorithms P & NP Concepts GATE Previous Years Solved Questions](https://gargsacademy.com/algorithms-p-np-concepts-gate-previous-years-solved-questions/) - Ques 1: A problem in NP is NP-complete if GATE 2006 (A) it can be reduced to the 3-SAT problem in polynomial time (B) the 3-SAT problem can be reduced to it in polynomial time (C) it can be reduced to any other problem in NP in polynomial time (D) some problem in NP can - [Number System GATE Previous Years Questions Solved](https://gargsacademy.com/number-system-gate-previous-years-questions/) - Ques 1: Consider the equation (43)x = (y3)8 where x and y are unknown. The number of possible solutions is ________. GATE 2015 Set 3 Ans: 5 Solution: 4x+3=8y+3 4x=8y x=2y Also 44 y ## Pages - [Home](https://gargsacademy.com/) - Beyond 100% in this Competitive Era. Learn from Educational Experts People who have developed expertise in particular areas are able to think effectively about problems in those areas. Understanding expertise provides insights into the nature of thinking and problem solving. View All Courses Competitive Corner Start Python Programming Languages C/C++ / Java / Python 60 - [Solved MCQs](https://gargsacademy.com/solved-mcqs/) - “NOTHING IS IMPOSSIBLE. THE WORD ITSELF SAYS I’M POSSIBLE”. YOUR PREPARATION IS JUST ONE CLICK AWAY. CLICK ON THE LINK TO PROCEED WITH. GATE Questions YEAR Wise Subject Wise GATE 2022 General Aptitude GATE 2021 Morning Session General Aptitude GATE 2021 Evening Session General Aptitude GATE 2020 General Aptitude GATE 2019 General Aptitude GATE 2018 - [BTech CS/IT](https://gargsacademy.com/btech-cs-it/) - “NOTHING IS IMPOSSIBLE. THE WORD ITSELF SAYS I’M POSSIBLE”. YOUR PREPARATION IS JUST ONE CLICK AWAY. CLICK ON THE LINK TO PROCEED WITH. B.E. / B.Tech CSE/IT (Computer Science and Engineering/Information Technology) Semester I PPS PPS LAB Semester II PPS PPS LAB Semester III DSA DSA LAB COA MATLAB Semester IV DAA DAA LAB WIT ## My Templates - [Default Kit](https://gargsacademy.com/?elementor_library=default-kit-4) - [Default Kit](https://gargsacademy.com/?elementor_library=default-kit-3) - [Default Kit](https://gargsacademy.com/?elementor_library=default-kit-2) - [Default Kit](https://gargsacademy.com/?elementor_library=default-kit) - [Header Phlox](https://gargsacademy.com/?elementor_library=header-phlox) - Garg's Academy Home About Contact My Account Blogs - [Footer Phlox](https://gargsacademy.com/?elementor_library=footer-phlox) - Become a Happy Student Join our Community Join Garg’s Academy to get premium material, reliable and relevant content, that too free of cost and start learning today. We will ensure your regular practice. Garg's Academy Bright Future Academic Solutions Visit Link Privacy Terms & Conditions Company Home About Contact My Account Blogs Blogs Address 71/23 - [footer-business](https://gargsacademy.com/?elementor_library=footer-business) - [Portfolio Template](https://gargsacademy.com/?elementor_library=portfolio-template) - when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it - [Contact Phlox](https://gargsacademy.com/?elementor_library=contact-phlox) - Contact With Us let’s create progress together for great business Meet Us In Office : Patricia C. 4401 Waldeck Street Grapevine Nashville, Tx Our Email Address : Info@yourdomain.com Info@dataanalytics.com Contact Numbers : +99 (0) 101 0000 888 +99 (0) 555 6759 126 Contact With Us Don’t Google design Questions Your email address will not be - [Portfolio Phlox](https://gargsacademy.com/?elementor_library=portfolio-phlox) - Portfolio The Works We Are Proud Of - [Blog Phlox](https://gargsacademy.com/?elementor_library=blog-phlox) - Elementor #26115 | Edit https://gargsacademy.com/wp-content/uploads/2022/03/banner-img.png Read More - [About Phlox](https://gargsacademy.com/?elementor_library=about-phlox) - Why Choose Us an exceptionally unique experience tailored to you We are idea generators, goal seekers, challenge-thirsty professionals, creators of unique Internet projects. We deliver unconventional solutions Minimal Design There are many variations passages of Lorem Ipsum majority Best Material There are many variations passages of Lorem Ipsum majority Our team meet the minds shaping - [Header-agency](https://gargsacademy.com/?elementor_library=header-agency) ## Quizzes & Surveys - [test](https://gargsacademy.com/qsm_quiz/test/) ## Categories - [Uncategorized](https://gargsacademy.com/category/uncategorized/) - [Subject Wise MCQ](https://gargsacademy.com/category/subject-wise-mcq/) - [BTech Syllabus](https://gargsacademy.com/category/btech-syllabus/) - [PPS LAB](https://gargsacademy.com/category/pps-lab/) - [Recruitment](https://gargsacademy.com/category/recruitment/) - [PPS](https://gargsacademy.com/category/pps/) - [DAA LAB](https://gargsacademy.com/category/daa-lab/) - [Eligibility Tests](https://gargsacademy.com/category/eligibility-tests/) - [GATE YEAR WISE](https://gargsacademy.com/category/gate-year-wise/) - [Operating System](https://gargsacademy.com/category/operating-system/) - [Discrete Math MCQ](https://gargsacademy.com/category/discrete-math-mcq/) - [Digital Logic MCQ](https://gargsacademy.com/category/digital-logic-mcq/) - [Computer Architecture MCQ](https://gargsacademy.com/category/computer-architecture-mcq/) - [Programming MCQ](https://gargsacademy.com/category/programming-mcq/) - [Data Structure MCQ](https://gargsacademy.com/category/data-structure-mcq/) - [Algorithm MCQ](https://gargsacademy.com/category/algorithm-mcq/) - [Operating System MCQ](https://gargsacademy.com/category/operating-system-mcq/) - [Database Management System MCQ](https://gargsacademy.com/category/database-management-system-mcq/) - [Computer Network MCQ](https://gargsacademy.com/category/computer-network-mcq/) - [Digital Logic](https://gargsacademy.com/category/digital-logic/) - [AJ LAB](https://gargsacademy.com/category/aj-lab/) - [BCA Syllabus](https://gargsacademy.com/category/bca-syllabus/) - [CBSE](https://gargsacademy.com/category/cbse/) - [Python](https://gargsacademy.com/category/python/) - [DS LAB](https://gargsacademy.com/category/ds-lab/) - [DS](https://gargsacademy.com/category/ds/) ## Tags - [GATE Digital Logic](https://gargsacademy.com/tag/gate-digital-logic/)