This document provides instructions for 5 programming assignments involving arrays and structures in C programming. The assignments include: 1) Computing frequencies of numbers in an array, 2) Displaying Pascal's triangle using one array, 3) Printing a pattern of letters, 4) Defining a structure to store data of up to 450 students, and 5) Defining a structure to store data of up to 200 bank customers. The document provides sample code and explanations for each assignment.
Let us C (by yashvant Kanetkar) chapter 3 SolutionHazrat Bilal
All rights reserved. No part of this slide
may be reproduced, stored in a retrieval
system, or transmitted, in any form or by
any means, without the prior permission.
Ex.1 Write a program to print the following pattern
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Ex.2 Write a program to find bigger of three integers.
Ex.3 Write a program to calculate GCD between two numbers.
Ex.4 Write a program to find transpose of matrix.
Ex.5 Write a program which deletes an element from an array & display all other elements.
Ex.6 Write a program to calculate XA+YB where A & B are matrix & X=2, Y=3.
Ex.7 Write a program to calculate the total amount of money in the piggy bank, given that coins of Rs.10, Rs.5, Rs.2, RS.1.
& many more.....
let us c(by yashwantkanetkar) solution chapter 4 solution 5th edition
Note:- I am not an expert. I am Engineering student. So my answer may have error or mistake
COURSE TITLE: SOFTWARE DEVELOPMENT VI
COURSE CODE: VIT 351
TOPICS COVERED:
ARRAYS
TYPES OF ARRAYS
MULTIDIMENSIONAL ARRAYS
CHARACTER HANDLING IN C
STRING HANDLING IN C
QUIZ SET 2
Let us C (by yashvant Kanetkar) chapter 3 SolutionHazrat Bilal
All rights reserved. No part of this slide
may be reproduced, stored in a retrieval
system, or transmitted, in any form or by
any means, without the prior permission.
Ex.1 Write a program to print the following pattern
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Ex.2 Write a program to find bigger of three integers.
Ex.3 Write a program to calculate GCD between two numbers.
Ex.4 Write a program to find transpose of matrix.
Ex.5 Write a program which deletes an element from an array & display all other elements.
Ex.6 Write a program to calculate XA+YB where A & B are matrix & X=2, Y=3.
Ex.7 Write a program to calculate the total amount of money in the piggy bank, given that coins of Rs.10, Rs.5, Rs.2, RS.1.
& many more.....
let us c(by yashwantkanetkar) solution chapter 4 solution 5th edition
Note:- I am not an expert. I am Engineering student. So my answer may have error or mistake
COURSE TITLE: SOFTWARE DEVELOPMENT VI
COURSE CODE: VIT 351
TOPICS COVERED:
ARRAYS
TYPES OF ARRAYS
MULTIDIMENSIONAL ARRAYS
CHARACTER HANDLING IN C
STRING HANDLING IN C
QUIZ SET 2
CBSE Class 12 Computer practical Python Programs and MYSQL Rishabh-Rawat
This upload is my Computer Science Practical File for CBSE class 12 Board exam practical.
Some errors in the displaying of the content might have crept in as I prepared this file on my android. ;P
Programming Fundamentals Arrays and Strings imtiazalijoono
Programming Fundamentals
Arrays and Strings
• Arrays
• Initializing arrays
• Multidimensional arrays
• Arrays as arguments to functions
• Strings
• String functions
Accessing Individual Components
Declaring Arrays
Arrays: Example Garbage
Multidimensional Arrays
1) Write a C program using arrays that produces the multiplication of two 2x2 matrices.
3-Dimensional Array
Write a program of your own choice that makes use of arrays of more than 2 dimensions.
2-Dimensional Arrays
Background Sometimes the standard C libraries (stdio.h, stdlib.h, e.pdfebrahimbadushata00
Background: Sometimes the standard C libraries (stdio.h, stdlib.h, etc) are not extensive enough
to handle every programming need. If you find yourself rewriting or reusing functions you’ve
written earlier like those used to calculate statistical parameters (mean, variance etc), copying the
code again and again is inefficient. If you could write the code once, troubleshoot it so it works,
and have it compiled in its own object file, you could then link these object files to your source
code object file and not have to rewrite all the functions. ------------------------------------------------
--------------------------------------------------------------------------------------- Page 2 Part I – [100
points] Description Your task is to create a personal library to implement a statistic package on
any given data (assume that the data is always of type float). To do this you must create: 1. a
header file (stats.h) with 5 function prototypes: § maximum() § minimum() § mean() – equation:
= = 1 0 [ ] 1 N i x i N x § variance() – equation: 2 1 0 2 ( [ ] ) 1 1 x i x N N i = = § histogram()
2. five (5) implementation files with each of functions listed above – min.c, max.c, mean.c,
variance.c, and histogram.c You will then write C code (main.c) that asks the user for the data
file he/she wishes to compute the statistics for and displays the results to the user. YOU WILL
NOT WRITE ANY STATISTICS FUNCTIONS IN main.c – you will simply call the functions
prototyped in stats.h and coded in min.c, max.c, mean.c, variance.c, and histogram.c!!!
Procedure: (Refer to textbook pg 669-677) 1. Create the header file stats.h: a. Start with a block
comment summarizing the purpose of the header file b. # define any constant that you need for
the header file (NOT YOUR CODE) c. Individual function prototypes (with introductory
comments stating purpose of each function) d. Save e. Below is the template for stats.h #ifndef
STATS_H #define STATS_H float minimum(…); // NOTE: You need to complete the
prototypes float maximum(…); float mean(…); float variance(…); void histogram(…); #endif //
STATS_H_INCLUDED EGR 107 Page 3 2. Create 5 implementation files (min.c, max.c,
mean.c, variance.c, histogram.c) a. Start with a block comment summarizing the purpose of each
implementation file b. #include the necessary standard C libraries for each function c. #include
“stats.h” – the angular brackets (< >) are used for standard C libraries found in the system
directory, the quotation marks (“ ”) indicate a custom library found in the SAME directory as
your code. d. #define – any constants for that particular implementation file e. Each file will
contain one function as you would normally write it. i.
The first four files will calculate maximum, minimum, mean, and variance and return one value
each time (so they can be regular call-by-value functions) ii. Your histogram function will count
the number of occurrences of data within a certain range; each range is commonly referred to as
a.
At the end of this lecture students should be able to;
Describe the C arrays.
Practice the declaration, initialization and access linear arrays.
Practice the declaration, initialization and access two dimensional arrays.
Apply taught concepts for writing programs.
Using standard libraries like stdio and sdtlib.h and using stats.h a.pdffashiongallery1
Unlike the Federal income tax, most states do not require some form of state income tax.
True
False
Solution
Correct answer is True
Unlike Federal income tax, most states do not require some form of state income tax - This
statement is true as fililng of Fedral income tax return is mandatory for almost everybody but
some US states like Alaska, Florida, Navada, South Dakota, Texas, Washington and Wayoming
do not require filing of state income tax..
Representational State Transfer (REST)
IaaS and Hybrid Cloud
Orchestration & Virtualization: Eucalyptus & Amazon
Content Delivery Network (CDN): Facebook and Akamai
PaaS and Container as a Service (CaaS)
PaaS: Google App Engine (GAE) and Ruby on Rails
CaaS: DockerHub
SaaS and Distributed Version Control (DVC)
SaaS: Facebook Testing (Infer and Sapienz)
DVC: GitHub and Git-LFS
Cloud Security and Privacy policies
NIST Guidelines, GDPR, CDN Security
Representational State Transfer (REST)
IaaS and Hybrid Cloud
Orchestration & Virtualization: Eucalyptus & Amazon
Content Delivery Network (CDN): Facebook and Akamai
PaaS and Container as a Service (CaaS)
PaaS: Google App Engine (GAE) and Ruby on Rails
CaaS: DockerHub
SaaS and Distributed Version Control (DVC)
SaaS: Facebook Testing (Infer and Sapienz)
DVC: GitHub and Git-LFS
Cloud Security and Privacy policies
NIST Guidelines, GDPR, CDN Security
Cloud Service Life-Cycle
Cloud Deployment Scenarios
Cloud Service Development and Testing
Web Service Slicing for Regression Testing of Services
Cloud Service Evolution Analytics
Quality of Service and Service Level Agreement
System of Systems Engineering (SoSE),
System “ilities” (Reliability, Availability, Maintainability, and Changeability),
State Series,
System Evolution Analytics,
System Network Evolution Rules,
System Network Complexity,
System Evolution Recommender
Service Evolution Analytics
P, NP, NP-Complete, and NP-Hard
Reductionism in Algorithms
NP-Completeness and Cooks Theorem
NP-Complete and NP-Hard Problems
Travelling Salesman Problem (TSP)
Travelling Salesman Problem (TSP) - Approximation Algorithms
PRIMES is in P - (A hope for NP problems in P)
Millennium Problems
Conclusions
Systems Analysis,
Systems Design,
Systems Modelling,
Systems Architecture,
System Development and Testing,
System Maintenance and Evolution,
SDLC example (Cloud Service life cycle)
Requirements Engineering,
Functional and Non-Functional Requirements,
Engineering Design Process and Process Engineering,
Logistics Management,
Risk management, and
Requirements specification
Complex systems,
Software systems,
Database systems,
Operating systems,
Bioinformatics systems,
Social Systems,
Service Oriented Systems,
Cloud Systems,
Ubiquitous systems,
Distributed Version Control Systems (GitHub), and
Software Container Systems (DockerHub and Google App Engine).
Interdisciplinary Science, Engineering, and Management,
Systems theory,
Systems thinking,
System development life cycles,
Synergy,
Project management,
Engineering Domains (Industry 4.0) , and
Communities (INCOSE and IEEE SMC Society).
1. Big Data Analytics
- Big Data
- Spark: Big Data Analytics
- Resilient Distributed Datasets (RDD)
- Spark libraries (SQL, DataFrames, MLlib for machine learning, GraphX, and Streaming)
- PFP: Parallel FP-Growth
2. Ubiquitous Computing
- Edge Computing
- Cloudlet
- Fog computing
- Internet of Things (IoT)
- Virtualization
- Virtual Conferencing
- Virtual Events (2D, 3D, and Hybrid)
1. Representational State Transfer (REST)
2. IaaS and Hybrid Cloud
- Orchestration & Virtualization: Eucalyptus & Amazon
- Content Delivery Network (CDN): Facebook and Akamai
3. PaaS and Container as a Service (CaaS)
- PaaS: Google App Engine (GAE) and Ruby on Rails
- CaaS: DockerHub
4. SaaS and Distributed Version Control (DVC)
- SaaS: Facebook Testing (Infer and Sapienz)
- DVC: GitHub and Git-LFS
5. Cloud Security and Privacy policies
- NIST Guidelines, GDPR, and CDN Security
1. Cloud Life-Cycle
2. Cloud Deployment Scenario
3. Cloud Service Development and Testing
4. Web Service Slicing for Regression Testing of Services
5. Cloud Service Evolution Analytics
6. Quality of Service and Service Level Agreement
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
The field of Information retrieval (IR) is currently undergoing a transformative shift, at least partly due to the emerging applications of generative AI to information access. In this talk, we will deliberate on the sociotechnical implications of generative AI for information access. We will argue that there is both a critical necessity and an exciting opportunity for the IR community to re-center our research agendas on societal needs while dismantling the artificial separation between the work on fairness, accountability, transparency, and ethics in IR and the rest of IR research. Instead of adopting a reactionary strategy of trying to mitigate potential social harms from emerging technologies, the community should aim to proactively set the research agenda for the kinds of systems we should build inspired by diverse explicitly stated sociotechnical imaginaries. The sociotechnical imaginaries that underpin the design and development of information access technologies needs to be explicitly articulated, and we need to develop theories of change in context of these diverse perspectives. Our guiding future imaginaries must be informed by other academic fields, such as democratic theory and critical theory, and should be co-developed with social science scholars, legal scholars, civil rights and social justice activists, and artists, among others.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Key Trends Shaping the Future of Infrastructure.pdf
C- Programming Assignment 3
1. Lab Assignment 3: Array and Structures: C Programming
CS-153 Computer Programming Lab
Autumn Semester, 2016, IIT Indore
Date: 17-08-16
Note: Write following programs in C language. Also note that this assignment will be evaluated by
TA’s in the upcoming labs of next week (22-08-16 onward) for each batch.
1. Write a program to compute the frequencies of all distinct numbers that appear in the array of size N.
Read N and the actual numbers in the array from the keyboard before you compute the frequency.
2. Write a program to display Pascal's triangle. Pascal's triangle represents the binomial coefficients*. The
first few rows of Pascal's triangle are displayed below. Observe how a row is related to the row above
it.
Extra Point: How many arrays did you use? Try solving the problem with just one array.
* Example of binomial coefficient for 6th
row is (x + y)5
= 1 x5
+ 5 x4
y + 10 x3
y2
+ 10 x2
y3
+ 5 x y4
+ 1 y5
3. Write a program to produce the following output:
A B C D E F G F E D C B A
A B C D E F F E D C B A
A B C D E E D C B A
A B C D D C B A
A B C C B A
A B B A
A A
4. Create a structure to specify data on students given below: Roll number, Name, Department, Course,
Year of joining Assume that there are not more than 450 students in the institute.
5. Create a structure to specify data of customers in a bank. The data to be stored is: Account number,
Name, Balance in account. Assume maximum of 200 customers in the bank.
2. #include<stdio.h>
#include<conio.h>
int main(){
int n, t, i, j, arr[30],len, halflen,flag=0,count=0;
printf("Enter number of elements to insert in an array:n");
scanf("%d",&len);
printf("Enter elements to insert in an array:n");
for(i=0;i<len;i++){
scanf("%d",&t);
arr[i]=t;
}
printf("n");
/*****************************/
for(i=0;i<len;i++){ //loop for pass 1 to len
count=1; //again initialize the count variable with 1
for(j=i+1;j<=len-1;j++){
if(arr[i]==arr[j] && arr[i]!='0'){ //if same value of arr[i] find at index 'j' and it is
not null then
count++; //increment the count of frequency for the value
arr[j]='0'; //store null value to arr[j]
}
}
if(arr[i]!='0'){ //if value of arr[i] is not null then
printf("%d is %d times.n",arr[i],count); //print the value if arr[i] and it frequency
count
}
}
/*****************************/
getch();
return 0;
}
3. #include<stdio.h>
#include<conio.h>
int main()
{
int array[10][10];
int i, j, k, rows;
printf("Enter the number of rowsn");
scanf("%d",&rows);
for(i=1; i<=rows; i++) //create array of size rows
{
for(j=1; j<=i; j++) //count of the values in a row will be same as the index 'i'
of the rows
{
if(j==1||j==i) //if it is first value of a row or count of the values in a row
matches with the row index 'i'
{
array[i][j]=1; //then store value 1 in array[i][j]
}
else
{
array[i][j]=array[i-1][i-j]+array[i-1][i-j+1]; //else sum the two values on
above row of
}
}
}
for(i=1; i<=rows; i++) //print array of size rows
{
for(k=1; k<=rows-i; k++) //adjust the spaces between printed values for the
index 1 to row-i
{
printf(" ");
}
for(j=1; j<=i; j++) //print values form the index 1 to i
{
printf("%d ",array[i][j]);
}
printf("n");
}
getch();
}
4. #include<stdio.h>
#include<conio.h>
main() {
int i,j,k,l;
for(i=71;i>=65;i--) {
/* loop for printing ascending letters */
for(j=65;j<=i;j++) {
printf("%c ",j);
}
/* loop for making a space between patterns */
for(k=i+1;k<=71;k++) {
if(k==71)
printf(" ");
if(k<71)
printf(" ");
}
/* loop to print descending letters */
for(l=i;l>=65;l--) {
if(l==71) { /* to skip printing 'G' twice */
continue;
}
printf("%c ",l);
}
printf("n");
}
getch();
return 0;
}
5. #include<stdio.h>
#include<conio.h>
#define N 450
struct students {
int rlnm;
char name[25];
char dept[25]; /* structure defined outside of main(); */
char course[25];
int year;
};
main() {
/* main() */
struct students s[N];
int i, ch;
/* taking input of 450 students in an array of structure */
for (i = 0; i < N; i++) {
printf(" Enter data of student %dtttttotal students: %dn", i + 1, N);
printf("****************************nn");
printf("enter rollnumber: ");
scanf("%d", & s[i].rlnm);
printf("nnenter name: ");
scanf(" %s", & s[i].name);
printf("nnenter department: ");
scanf("%s", & s[i].dept);
printf("nnenter course: ");
scanf("%s", & s[i].course);
printf("nnenter year of joining: ");
scanf("%d", & s[i].year);
}
getch();
}
6. #include<stdio.h>
#include<conio.h>
#define N 200
struct bank {
int acn;
char name[20];
int bal; /* defined out of main() */
};
void main() {
struct bank b[N];
int i, ch, lw = 100, ch2, ac, am;
for (i = 0; i < N; i++) {
/* inputting customer data */
printf("tEnter information of customers n");
printf("t******************************nn");
printf("enter account no.: ");
scanf("%d", & b[i].acn);
printf("nnenter customer name: ");
scanf("%s", & b[i].name);
printf("nnenter balance: ");
scanf("%d", & b[i].bal);
}
getch();
}