Union variable can be declared while defining a union or after defining a union.
Union variable declaration example in C
Let us see how to declare a union variable while defining a union.
union book {
char name[32];
int price;
}obj;
Here, obj is a union variable of type union book and it is declared while defining the union book.
Let us see how to declare a union variable after defining a union.
union book {
char name[32];
int price;
};
union book obj1, obj2;
Here, obj1 and obj2 are union variables of type union book. And they are declared after defining the union book.
Union variable declaration example in C
#include <stdio.h> #include <string.h> union book { char name[32]; int price; }obj1; // union variable declaration at definition union book obj2; // union variable declaration after definition int main() { strcpy(obj1.name, "Davinci code"); printf("obj1.name: %s\n", obj1.name); strcpy(obj2.name, "Twilight"); printf("obj2.name: %s\n", obj2.name); return 0; }
Output:
jp@jp-VirtualBox:~/$ ./a.out
obj1.name: Davinci code
obj2.name: Twilight
obj1.name: Davinci code
obj2.name: Twilight
Mobile App Development Company in India
ReplyDeleteMobile App Development Company in Mumbai
Android App Development Company in India
iOS App Development Company in India
Hybrid App Development company in India at
http://www.appslure.com/mobile-apps-development/
Mobile app Development Company in Dubai at
http://www.appslure.online
Mobile app development company in Kuwait at
http://www.appslure.online/mobile-app-development-company-kuwait.html
Mobile App Development Company in Abu Dhabi at
http://www.appslure.online/mobile-app-development-company-abu-dhabi-uae.html
Website Development company in Delhi at
http://www.appslure.com/web-development/
Mobile app Development Company in Delhi
http://www.appslure.com/
IOS app Development Company in Gurgaon,
IOS app Development Company in Noida at
http://www.appslure.com/ios-app-development-company
Android app Development Company in Gurgaon,
Android app Development Company in Noida at
http://www.appslure.com/android-app-development-company/
Nice article admin thanks for share your atricle keep share your knowledge i am waiting for your new post check mens winter jackets polo shirts kindly review and reply me
ReplyDeleteHello Everyone !
ReplyDeleteUSA SSN Leads/Dead Fullz available, along with Driving License/ID Number with good connectivity.
All SSN's are Tested & Verified.
**DETAILS IN LEADS/FULLZ**
->FULL NAME
->SSN
->DATE OF BIRTH
->DRIVING LICENSE NUMBER
->ADDRESS WITH ZIP
->PHONE NUMBER, EMAIL
->EMPLOYEE DETAILS
*Price for SSN lead $2
*You can ask for sample before any deal
*If you buy in bulk, will give you discount
*Sampling is just for serious buyers
->Hope for the long term business
->You can buy for your specific states too
**Contact 24/7**
Whatsapp > +923172721122
Email > leads.sellers1212@gmail.com
Telegram > @leadsupplier
ICQ > 752822040
If you care about some famous celebrities click https://www.celebswikipost.com
ReplyDeleteI suppose if I had to pick a perfect article, it would be yours. I know no article is perfect, but yours is as close as it gets. Good job. But Mobile app development in Dubai leverages cutting-edge technology to create user-centric applications, meeting the demands of this dynamic and tech-savvy business environment.
ReplyDeleteMoreover, the UAE's strategic location and business-friendly environment make it an attractive destination for companies looking to outsource their Website designers UAE projects. With its advanced infrastructure, robust regulatory framework, and access to global markets, the UAE offers a conducive ecosystem for businesses to thrive and expand their operations. Website development companies in the UAE leverage this advantage to deliver high-quality services to clients around the world, ensuring seamless communication, timely delivery, and cost-effective solutions.
ReplyDelete