69 - DIFFERENCE BETWEEN STRUCTURE & UNION - C PROGRAMMING

  Рет қаралды 74,828

Sundeep Saradhi Kanthety

Sundeep Saradhi Kanthety

Күн бұрын

Difference between union and structure is in memory allocated to the variable.
For structure variable the memory allocated is the sum of sizes of all the members of a structure.
For Union variable the memory allocated is the highest size of the member of a union.

Пікірлер: 69
@irukoticherishma1751
@irukoticherishma1751 3 жыл бұрын
Excellent explaination sir ...👏👏
@drnnarayana5027
@drnnarayana5027 5 жыл бұрын
Explained it with a great conceptual clarity sir.
@anatomic_anime
@anatomic_anime 8 ай бұрын
Thankyou sir ❤
@kalyanachakravarthi2736
@kalyanachakravarthi2736 4 жыл бұрын
Sir in the example which you gave for unions, will the union can only save one element at a time or can it save both the elements?
@vidyapaygude8650
@vidyapaygude8650 8 ай бұрын
Thnks, so far clear and easiest explanation
@girishkumar9550
@girishkumar9550 5 жыл бұрын
tell me in which type of condition where union can be use. and why use union. why not structure
@sivaprasadchitikella5947
@sivaprasadchitikella5947 2 ай бұрын
Super sir nice Explanation
@madhamanish8959
@madhamanish8959 4 жыл бұрын
Thank you so much sir .. Cleared my confusion
@SatishNaidu_143
@SatishNaidu_143 5 жыл бұрын
Sir we want clarifies structure, function, pointer, files chapter some clarification in that programme not understand if you want to explain
@bidyutkrdas54
@bidyutkrdas54 5 жыл бұрын
Sir,what happens if we declare the float first in union and then int ?will the output somehow change?
@vimalareddy5957
@vimalareddy5957 5 жыл бұрын
Sir for union the output will print only the higher value?
@dharma3404
@dharma3404 5 жыл бұрын
Sir in the previous video about structures u said that if we give a tag name to the structure we have declare structure variable in the main function but in this program why u have declared before main function but u have given tag name student does it matter or not please explain sir?
@iniyaviji2796
@iniyaviji2796 Жыл бұрын
Clear explaination thank u sir
@siddhu-46
@siddhu-46 3 жыл бұрын
Nice explanation 👌
@srisaiadithiya1318
@srisaiadithiya1318 Жыл бұрын
Thank you very much sir
@praneethReddyGangidi
@praneethReddyGangidi 6 жыл бұрын
Sir if both data types have same size then how the memory is allocated and what will be the output
@sundeepsaradhi
@sundeepsaradhi 6 жыл бұрын
hi Praneeth if both the members are of same data type like struct { int a; int b; }s1; Here S1 is structure variable with two members with integer data type so Memory allocated for S1 is 4 Bytes. union { int a; int b; }s1; Here S1 is union variable with two members with integer data type so Memory allocated for S1 is 2 Bytes and the same 2 Bytes will be shared by both the union members. Hope your doubt has been clarified.
@ashutoshsahoo1870
@ashutoshsahoo1870 6 жыл бұрын
it will take one of them
@naurinsultana1166
@naurinsultana1166 3 жыл бұрын
You r the best sir
@kp7677
@kp7677 3 жыл бұрын
Very simple He made understand
@abdulfareed2585
@abdulfareed2585 5 жыл бұрын
Great explained 😍
@anindasen3818
@anindasen3818 2 жыл бұрын
very nicely explained.
@anithat9275
@anithat9275 5 жыл бұрын
Sir I need the difference between static memory and dynamic allocation can you send the link
@harshnarai8627
@harshnarai8627 4 жыл бұрын
Thanku sir very briefly explained
@ANGamer990
@ANGamer990 9 ай бұрын
Thanks
@dudekulachandbasha9959
@dudekulachandbasha9959 5 жыл бұрын
By u r lecturer I will get good marks sir conform pakka
@kommirihemalatha2686
@kommirihemalatha2686 Жыл бұрын
Then what is the use of union sir
@ashutoshsahoo1870
@ashutoshsahoo1870 6 жыл бұрын
sir, I'm geting worng out put #include union student{ int roll; float mark; }s1 = {10, 99.9}; main() { printf("Values of S1 : %d \t %f ", s1.roll, s1.mark); } output : Values of S1 : 10 0.000000
@BasantGurukull
@BasantGurukull 5 жыл бұрын
whats the error ?
@subratakundu8713
@subratakundu8713 5 жыл бұрын
&
@jatrothgopal
@jatrothgopal 3 жыл бұрын
Good sir
@tejeswarv450
@tejeswarv450 5 жыл бұрын
Awesome explanation
@varevatalkies4853
@varevatalkies4853 7 жыл бұрын
Sir, please upload videos on files, type definition ,dynamic memory location ,preprocessor directives,sir, please.....
@sundeepsaradhi
@sundeepsaradhi 7 жыл бұрын
hi vardini i would like to have a FEEDBACK ( in the form of video not more than 15 sec) from you towards our channel and my sessions.so that i will collect feedbacks from all and will upload in youtube, Send your valuable FEEDBACK to my WhatsApp number : +91 9885466061 (91 is the country code) waiting for your valuable feedback. kzbin.info SO MAKE A VIDEO WITH FEEDBACK ON OUR CHANNEL AND SEND AS SOON AS POSSIBLE.ask your friends to send their feedback.
@chiranjeevikumarbattula8709
@chiranjeevikumarbattula8709 3 жыл бұрын
Yes sir
@m.vijayaraghavendra9364
@m.vijayaraghavendra9364 4 жыл бұрын
How to use unions to arrays
@jibu9336
@jibu9336 Жыл бұрын
super sir
@Strafkolonie
@Strafkolonie 6 жыл бұрын
So are unions used to save memory ?
@kalyanachakravarthi2736
@kalyanachakravarthi2736 4 жыл бұрын
yes
@poojithaganduri4093
@poojithaganduri4093 2 жыл бұрын
Tq
@puneethhb7905
@puneethhb7905 3 жыл бұрын
Sir how to a declare function
@base2base217
@base2base217 6 жыл бұрын
In the union program I get as output the first member of the union variable s1, and not the highest is shared, i.e rno = 20 perc = 0.00000 May I have an answer?
@chanakyabharadwaj1286
@chanakyabharadwaj1286 2 жыл бұрын
its u.i not s use u.i for union u will get the answer
@codingvibesofficial
@codingvibesofficial 2 жыл бұрын
Same for me
@Hmkm522
@Hmkm522 7 жыл бұрын
sir about merge and quick sort pls explain sir
@sundeepsaradhi
@sundeepsaradhi 7 жыл бұрын
HI manoj definitely i will upload them soon with in 2 or 3 days
@harshith_takkala
@harshith_takkala 4 жыл бұрын
sir for float it is coming 0.0000 what should i do
@dudekulachandbasha9959
@dudekulachandbasha9959 5 жыл бұрын
No douts sir very t q sir
@faizanhabib4585
@faizanhabib4585 3 жыл бұрын
Nice
@Mysteryp7
@Mysteryp7 6 жыл бұрын
hi isnt int 4 byte?
@silverwerewolf975
@silverwerewolf975 5 жыл бұрын
yep
@zoteasailofs1526
@zoteasailofs1526 5 жыл бұрын
Thankyouuu
@k.s.saideepak5240
@k.s.saideepak5240 6 жыл бұрын
Sir ,then how to print rno value in union ?
@GodNinja.69
@GodNinja.69 3 жыл бұрын
Just dont print tha percentage
@Hmkm522
@Hmkm522 7 жыл бұрын
thank u sir
@sundeepsaradhi
@sundeepsaradhi 7 жыл бұрын
hi manoj i would like to have a FEEDBACK ( in the form of video not more than 15 sec) from you towards our channel and my sessions.so that i will collect feedbacks from all and will upload in youtube, Send your valuable FEEDBACK to my WhatsApp number : +91 9885466061 (91 is the country code) waiting for your valuable feedback. kzbin.info SO MAKE A VIDEO WITH FEEDBACK ON OUR CHANNEL AND SEND AS SOON AS POSSIBLE.
@githiontutorial3861
@githiontutorial3861 4 жыл бұрын
Super sir
@kushal8385
@kushal8385 3 жыл бұрын
That was good u deserve a like and subscribe!!
@palakurpushpa9241
@palakurpushpa9241 5 жыл бұрын
Tq sir
@sarambakrishnancp9475
@sarambakrishnancp9475 2 жыл бұрын
Ok bie
@manikantaswamysirivella7531
@manikantaswamysirivella7531 4 жыл бұрын
Tell use of union
@shantanunayek3072
@shantanunayek3072 4 жыл бұрын
Sir suppose we have char and int datatypes under union... Now we store 10 into int and print%c, char... What output we will get? Does it gives 10?
@surya_Narayana-bc2wd
@surya_Narayana-bc2wd 6 жыл бұрын
I requested sir
@adss5095
@adss5095 2 жыл бұрын
This is why i hate byjus 😁
@sivakrishna4502
@sivakrishna4502 6 жыл бұрын
super sir
@sundeepsaradhi
@sundeepsaradhi 6 жыл бұрын
hi shiva thanks for your interest towards our channel.
70 - TYPEDEF with Example - C Programming
10:39
Sundeep Saradhi Kanthety
Рет қаралды 9 М.
64 - STRUCTURES - C PROGRAMMING
27:00
Sundeep Saradhi Kanthety
Рет қаралды 203 М.
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
kak budto
Рет қаралды 1,2 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 223 М.
Union Data Types | C Programming Tutorial
11:42
Portfolio Courses
Рет қаралды 15 М.
the cleanest feature in C that you've probably never heard of
8:13
WHY IS THE HEAP SO SLOW?
17:53
Core Dumped
Рет қаралды 240 М.
71 - INTRODUCTION TO FILES - C PROGRAMMING
24:55
Sundeep Saradhi Kanthety
Рет қаралды 120 М.
you will never ask about pointers again after watching this video
8:03
C_114 Unions in C | C Language Tutorials
17:19
Jenny's Lectures CS IT
Рет қаралды 165 М.
Is the C programming language still worth learning?
9:27
Jacob Sorber
Рет қаралды 104 М.
WHY IS THE STACK SO FAST?
13:46
Core Dumped
Рет қаралды 159 М.
Structure Padding in C
8:42
Neso Academy
Рет қаралды 242 М.
struct Basics | C Programming Tutorial
24:44
Portfolio Courses
Рет қаралды 142 М.
Synyptas 4 | Жігіттер сынып қалды| 3 Bolim
19:27
kak budto
Рет қаралды 1,2 МЛН