Skip to main content

Posts

Showing posts from September 5, 2018

Union in C Programming Language

Union in C Programming Language In this tutorial, We will learn about unions in C programming language. Introduction A union is a user-defined data type. In union, all members share the same memory location. For example in the following C program, both A and B share the same location. If we change A, we can see the changes being reflected in B. #include <stdio.h> union test { int A, B; }; int main() { // A union variable t union test t; t.A = 2; // t.B also gets value 2 printf ("After making A = 2:\n A = %d, B = %d\n\n", t.A, t.B); t.B = 10; // t.A is also updated to 10 printf ("After making Y = 'A':\n A = %d, B = %d\n\n", t.A, t.B); return 0; } Declare Union in C Like the structure, we use keyword union in order to declare a union in C programming language. union test { int A, B; }; Access Union in C Like the structure, we use the dot operator ...

Joint Entrance Examination-2019

Joint Entrance Examination-2019 Company Name Joint Entrance Examination-2019 Post Name B.Tech State ALL INDIA Salary NA Number of Vacancy NA Eligibility 12th with Science     Last Date 30-09-2018 Application Details Job Notification Apply Online Job Application Joint Entrance Examination-2019 Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Graduate Aptitude Test Engineering (GATE)- 2019

Graduate Aptitude Test Engineering  (GATE)- 2019 Company Name Graduate Aptitude Test Engineering Post Name M.Tech/PSU State ALL INDIA Salary NA Number of Vacancy NA Eligibility B.Tech/B.E    Last Date 21-09-2018 Application Details Job Notification Apply Online Job Application Graduate Aptitude Test (GATE)- 2019 Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Structure in C Programming Language

Structure in C Programming Language In this tutorial, We will learn structure in C programming language. Introduction In C programming language, A structure is another user-defined data type available that allows a programmer to combine data items of a different type. Declare Structure in C To define a structure, you must use the struct statement. The struct statement defines a new data type, with more than one member struct [structure tag] { member definition; member definition; ... member definition; } [one or more structure variables]; struct Books { char title[50]; char author[50]; char subject[100]; int book_id; } book; Access Structure in C To access any member of a structure, we use the member access operator (.). The member access operator is coded as a period between the structure variable name and the structure member that we wish to access. struct Books Book1; /* Declare Book1 of type ...