The document defines and explains structures in C programming. It discusses:
1) Defining a structure with member variables of different data types.
2) Declaring structure variables and allocating memory for them.
3) Accessing structure members using the dot operator.
4) Initializing, assigning values to, and reading/displaying structure members.
5) Arrays of structures and structures within other structures.
Introduction, Array of structure, Passing structure to function, Passing array of structure to function, Structure within structure ( Nested Structure), Union, Pointer to structure
A structure is a collection of variables referenced under one name providing a convenient means of keeping related information together. The structure definition creates a format that may be used to declare structure variables in a program later. data structure in c questions and answer
Introduction, Array of structure, Passing structure to function, Passing array of structure to function, Structure within structure ( Nested Structure), Union, Pointer to structure
A structure is a collection of variables referenced under one name providing a convenient means of keeping related information together. The structure definition creates a format that may be used to declare structure variables in a program later. data structure in c questions and answer
COURSE TITLE: SOFTWARE DEVELOPMENT VI
COURSE CODE: VIT 351
TOPICS COVERED:
USER DEFINED DATATYPES
STRUCTURE
UNION
TYPEDEF
DIFFERENCE BETWEEN STRUCTURE AND UNION
ENUMERATION (ENUM)
QUIZ SET 4
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Sudheer Mechineni, Head of Application Frameworks, Standard Chartered Bank
Discover how Standard Chartered Bank harnessed the power of Neo4j to transform complex data access challenges into a dynamic, scalable graph database solution. This keynote will cover their journey from initial adoption to deploying a fully automated, enterprise-grade causal cluster, highlighting key strategies for modelling organisational changes and ensuring robust disaster recovery. Learn how these innovations have not only enhanced Standard Chartered Bank’s data infrastructure but also positioned them as pioneers in the banking sector’s adoption of graph technology.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
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.
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
1. INTRODUCTION:
A structure is a collection of elements of different types of data.
Ex: consider the student information roll number, gender, age,
height and weight of different types.
main()
{ struct student rno gender
2 1
{
int rno; age ht wt
2 4 4
char gender;
int age; 13 bytes of memory is allocated in s1
2. 13 bytes of memory is allocated to s2
float ht; age
gender
float wt; 2 1
}; age ht wt
2 4 4
struct student s1,s2;
}
When all these data items are grouped under on single variable
name, we can get some meaningful information.
struct is a keyword used to create a new user defined data type.
In some other high level programming languages the structures
are named as records
3. DEFINING A STRUCTURE:
syntax:
Example:
struct user defined datatype struct student
{
{ int rno;
datatype member1; int age;
char gender;
datatype member2; float ht;
……………. float wt;
};
…………
datatype membern:
};
4. In the given syntax struct is keyword used to create new user defined
data type.
An user defined data type name may be any valid ‘c’ identifier ( user
defined name).
The data type may be a valid simple data type or compound data type.
The member names may be any valid ‘C’ identifiers .in the given
example student is a new user defined data type name.
The variable rno, age, gender, ht, wt, are the structure members.
All these structure members must be enclosed within a pair of curly
braces.
The structure definition should be terminated with semicolon.
5. DECLARING STRUCTURE VARIABLE:
Once a new user defined datatype is created by using the
keyboard struct then we can create any no. of structure variables of that
type.
syntax:
struct user defined_data type name
structure var1, structure var2,……….. Struct varn;
Above statement is called declarative statement of structure variables
and it allocates memory space to these variables.
We can also declare structure variables immediately after structure
definition.
6. ACCESSING STRUCTURE MEMBERS:
. Structure member accessing operator
S1.gender=‘m’; s1.age=25;
Structure
S1.rno=100 S1.ht=5.5; s1.wt=60.2;
variable
Structure member
•Two operators are used to access member of structure. The structure
member operator(.) also called dot operator and the structure pointer
operator () also called the arrow operator.
•The structure member operator accesses a structure member via structure
variable name.
7. syntax:
Ex: s1.rno, s1.age, s1.gender, s1.ht, s1.wt
S1.rno=100; s1.gender=M; s1.age=25; s1.ht=5.5; s1.wt=60.2
s1 s2
rno gender rno gender
100 M
age ht wt age ht wt
25 5.5 60.2
ASSIGNING VALUES TO STRUCTURE MEMBERS:
By using the assignment operator(=) we can assign values to all
structure members of a structure variable.
Syntax: structure variable.member = value;
Ex: s1.rno= 100; s1.age=25
8. INITIALIZING A STRUCTURE VARIABLE:
Structures can be initialized using initialize lists as with arrays. To
initialize a structure follow the variable name in the structure
declaration with an equal sign and brace enclosed comma separated
list of initializes.
Ex: struct student s1={100, 25,’M’, 5.5,65.2};
int x = 10;
int a[10]={ 10,20,30};
READING AND DISPLAYING THE STRUCTURE VARIABLES:
The ‘C’ will not read or write an entire structure as a single command. It
will read or write the members of a structure as follows:
ex: scanf(“ %d, %d, %c, %f” ,&s1.rno,&s1.age,&s1.gender,&s1.ht);
printf(“ %d %d %c %f”, s1.rno, s1.age, s1.gender, s1.ht);
9. PROGRAM USING STRUCTURES:
Reads the details of 2 students and calculate total and average
marks of 2 students.
#include<stdio.h>
#include<conio.h>
void main()
{ /* defining a structure */
struct student
{ int rno;
char name[30];
float m1,m2,m3;
float tot, avg;
};
10. /* 2. declaration of structure var*/
struct student s1,s2; (1st executed)
/* 3.reading 1st student details*/
printf(“ enter rno,name,m1,m2,m3 of first student n”);
scanf(“ %d %s %f %f %f ”,
&s1.rno,&s1.name,&s1.m1,&s1.m2,&s1.m3);
/* 4. reading 2nd student details*/
printf(“ enter rno, name, m1, m2, m3,of second student n);
scanf(“ %d %s%f %f %f”, &s2.rno,
&s2.name,&s2.m1,&s2.m2,&s2.m3);
/* calculate total and avg of first student marks*/
s1.tot= s1.m1+s1.m2+s1.m3;
s1.avg = s1.tot/3;
11. /* 6.calculate total and avg of first student marks*/
s2.tot= s2.m1+s2.m2+s2.m3;
s2.avg = s2.tot/3;
/* displaying first student details*/
printf(“ first student details are n”);
printf( “roll no:%dn, name:%s n, m1: %f n. m2:%f, m3:%f n”, s1.rno,
s1.name, s1.m1, s1.m2, s1.m3);
printf(“ total :%f n , average: %f n”, s1.tot, s1.avg);
/* 8. displaying second student details*/
printf(“ second student details are:n);
printf( “roll no:%dn, name:%s n, m1: %f n. m2:%f, m3:%f n”,
s2.rno, s2.name, s2.m1, s2.m2, s2.m3);
printf(“ total :%f n , average: %f n”, s2.tot, s2.avg);
}
12. Array of Structures:
Perhaps the most common usage of structures is an array of
structures.
->To declare an array of structures you must first define a structure
and then declare an array variable of that type.
For example to declare a 100 element array of structures of type
“student” write
struct student
{
int rno;
int m1,m2,m3;
int tot,avg;
}
struct student s[100];-Structure Variable Declaration
13. DEMONSTRATING ARRAY OF STRUCTURES:
#include<stdio.h>
#include <conio.h>
void main()
{
/*1.Defining an array of structures*/
struct student
{
int rno;
int m1,m2,m3;
int tot,avg;
};
14. /*2.Creating an array of Structures*/
struct student s[100];
int i,n;
clrscr();
printf(“Enter n valuen”);
/*3.Read total no.of students to n*/
scanf(“%d”,&n);
/*4.Reading student details*/
for(i=0;i<n;i++)
{
printf(“Enter details of %d studentn”,i+1);
scanf(“%d”,&s[i].rno);
17. Arrays with in Structures:
A member of a structure may be either a simple or compound type.
simple member is one that is of any of the built-in datatypes such as integer or
character.
->The compound datatypes include one dimensional and multidimensional
arrays of other datatypes and structures.
For example consider this Structure:
struct x
{
int rno;
int m[3];/* An Array is described as a structure member*/
int tot,avg;
}
18. Nested Structures:
when a structure variable is a member of another structure, it is
called a Nested structure.
->In the below example structure variable ‘z’ is declared as structure
Member to another structure.
EX:struct Test
{
int a;
int b;
};
Struct Exam
{
int x;
int y;
struct Test z;
};
19. Structures and Function:
A Structure can be passed to a function as a one variable or
as an individual member. The scope of a structure declaration should
be external storage class whenever a function in the main().
Program Using a Structure datatype:
#include<stdio.h>
/*Defining a Structure*/
struct Test
{
int a;
int b;
};
/*Prototype*/
20. struct Test Modify(struct Test s2);
void main()
{
struct Test T1={10,20};
T1=Modify(T1);
printf(“After calling modifyn”);
printf(“T1.a=%dn”,T1.a);
printf(“T1.b=%dn”,T1.b);
}
Stuct Test Modify(struct Test s2)
{
s2.a=s2.a+10;
22. Union:
Union is another datatype with two or more members,similar to
structure.But in this case all the members share a common
memory location.The members of a union can be refered by using
dot operator as in the case of structure.
The size of union can contain only one type of member at any
one time.
The size of union corresponds to the length of the longest
member.
Syntax:
Union Userdefined_datatype
{
datatype member 1;
datatype member n;};
23. Union Test
{
char a;
int b;
float c;
};
We may have structures with unions and unions with in structures.
Unions may also be intialized like structures.However,Since only
one member can be active at a time,Usually the assigned value will
go to the 1st member of union.