Coding tips and trick
In this page we learn about programming language from each other.So came follow and share your ideas
C Program to Store Information of a Student Using Structure
Example: Accessing Union Members
Difference between unions and structures
Let's take an example to demonstrate the difference between unions and structures:
Access members of a union
Another way of creating union variables is:
union car
{ char name[50];
int price;} car1, car2, *car3;
Create union variables
How to define a union?
union car
{
char name[50];
int price;
};
Now we are starting
"union" in C ,
are you ready for learn
union
leave a comment please
Passing struct by reference
Return struct from a function
C Structure and Function..........Passing structs to functions......
Why we study "structs" in C ?
Example of struct👇👇
Access Structure Members
To access members of a structure, use the dot syntax (.):
Syntax of struct
struct structureName {
dataType member1;
dataType member2;..};
C struct
In C programming, a struct (or structure) is a collection of variables (can be of different types) under a single name.
C Program to Find the Frequency of Characters in a String
Example of gets() and puts()
gets() and puts()
Functions gets() and puts() are two string functions to take string input from the user and display it respectively as mentioned
C String 👍Functions
Commonly Used String Functions
Example 4: Strings and Pointers
Example 3: Passing string to a Function
Example 2: fgets() and puts()
Example 1: scanf() to read a string
String initialization in C
Declaration of string
String
In C programming, a string is a sequence of characters terminated with a null character \0. For example:
char c[] = "c string";
Now we are start string in C
Example 3: realloc()
Syntax of realloc()
ptr = realloc(ptr, x);
Here, ptr is reallocated with a new size x.
C realloc()
Example 2: calloc() and free()
Example 1: malloc() and free()
Syntax of free()
free(ptr);
Syntax of calloc():
ptr = (castType*)calloc(n, size);
: Example :
ptr = (float*) calloc(25, sizeof(float));
Example
ptr = (float*) malloc(100 * sizeof(float));
Click here to claim your Sponsored Listing.
Videos (show all)
Category
Contact the business
Address
Civil Line, Banda
Banda, 210001
Computer Desktop, Laptop Sales & Service, Peripherals, Speaker, LED Monitor, Printer, UPS, Cartridge, Ink, Keyboard, Mouse, Laptop Adopter, Antivirus and all type Computer accessor...
Banda, 210001
Computer hardware and software courses Nd skill development trainings�
Banda, 210001
Excite Computer Center we provide to computer education. best teachnology way.