Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
Assignment of Structure in C - CodeGK
Δ C Examples
Hello_world
"Hello World" program in C
Break
Break out of For Loop in C
Break out of While Loop in C
Strings
String Declaration in C ?
String Initialization in C ?
strlen() in C
strcpy() in C
strcat() in C
strcmp() in C
For_loop
Number Loop in C
Iterate Through String in C
Variables
Global Variable in C
Local Variable in C
Booleans
C Booleans
Arrays
Character Array in C
Integer Array in C
While_loop
While Loop in C
Recursive_function
Factorial with C Function Recursion
Sum of Natural Numbers with C function Recursion
Function
add Two numbers in C
Calculating factorial of number using Recursion in C
Print
puts() in C
printf() in C
printf() for printing various types of Data Types
Continue
Continue in For Loop in C
Continue in While Loop in C
If_else
IF in C
ELSE in C
Else-If in C
Numbers
Integers in C
Float in C
Double in C
Syntax
Right Syntax in C
Wrong Syntax in C
Operators
Comparison Operators in C
Arithematic Operators in C
Assignment Operators in C
Logical Operators in C
Constants
Constants in C
Violating-Constants in C
Structures
Initializing a Structure in C
Assignment of Structure in C
♦ Assignment of Structure in C
♣ Example2: Assignment of Structure in C
In this example, there is an Assignment of point x and y.
Example
Input:
Run CODE
Reload Code
Copy Code
#include
#include
struct Point { float x; float y; }; int main() { struct Point p1, p2; p1.x=10; p1.y=15; printf("%f %f\n", p1.x, p1.y); return 0; }
Output:
Structures
Assignment of Structure in C