

{"id":59381,"date":"2019-06-15T16:38:12","date_gmt":"2019-06-15T11:08:12","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=59381"},"modified":"2021-06-10T13:56:24","modified_gmt":"2021-06-10T08:26:24","slug":"structures-in-c","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/structures-in-c\/","title":{"rendered":"Structures in C &#8211; Makes Coder Life Easy"},"content":{"rendered":"<p>So far, we discussed the various user-defined <a href=\"https:\/\/data-flair.training\/blogs\/data-types-in-c\/\"><strong>data types available in C<\/strong> <\/a>such as union, enumeration, and typedef. But we are yet to discuss one of the most important user-defined data type called structures in C.<\/p>\n<p><em>C Structures are the optimal way to represent data as a whole. We use structures to overcome the drawback of arrays.<\/em><\/p>\n<p>We already know that arrays in C are bound to store variables that are of similar data types.\u00a0Creating a structure gives the programmer the provision to declare multiple variables of different data types treated as a single entity.<\/p>\n<p>In this tutorial, we will discuss:<\/p>\n<ul>\n<li>Significance of Structures in C<\/li>\n<li>Create a Structure in C<\/li>\n<li>Meaning of Array of Structures<\/li>\n<li>Simplify the syntax of structure using typedef<\/li>\n<li>Nested Structures in C<\/li>\n<li>Pass structures to a function<\/li>\n<li>Access Structures using pointers<\/li>\n<li>Difference between Structure in C and C++<\/li>\n<\/ul>\n<h2>1. What are Structures in C?<\/h2>\n<p>In layman language, <em>a structure is nothing but a cluster of variables that may be of different data types under the name name<\/em>.<\/p>\n<p>In programming terminology, <em>a structure is a composite data type (derived from primitive data types such as int and float) that we use in order to define a collection of similar or different data types under one same name in a particular block of computer memory<\/em>.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59446\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg\" alt=\"Structure in C Programming\" width=\"802\" height=\"420\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg 802w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming-520x272.jpg 520w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/a><\/p>\n<h2>2. Significance of Structures in C<\/h2>\n<p>Now that we understood the primary purpose of structures, let us acknowledge its significance by considering a very simple problem at hand.<\/p>\n<p>Suppose you want to take the input of a particular date and display it. It would probably be a lot easier if we treat the records of the structure (day, month and year) as a single unit by logically relating them with each other.<\/p>\n<p><strong>Here is a program in C that illustrates how to solve the above problem:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include &lt;stdio.h&gt;\r\nstruct date\r\n{\r\nunsigned int day, month, year;\r\n};\r\nint main()\r\n{\r\n\r\nstruct date d = {12, 11, 2020}; \/\/ Here d is an object of the structure time\r\n\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\n\r\nprintf(\"The Date is %d \/ %d \/ %d\\n\", d.day, d.month, d.year);\r\nreturn 0; \r\n}<\/pre>\n<p><strong>Code-\u00a0<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Structures-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59395\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Structures-in-C.jpg\" alt=\"Example of Structures in C\" width=\"1298\" height=\"670\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Structures-in-C.jpg 1298w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Structures-in-C-150x77.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Structures-in-C-300x155.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Structures-in-C-768x396.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Structures-in-C-1024x529.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Structures-in-C-520x268.jpg 520w\" sizes=\"auto, (max-width: 1298px) 100vw, 1298px\" \/><\/a><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Structures-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59396\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Structures-in-C.jpg\" alt=\"Output of Structures in C\" width=\"1302\" height=\"686\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Structures-in-C.jpg 1302w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Structures-in-C-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Structures-in-C-300x158.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Structures-in-C-768x405.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Structures-in-C-1024x540.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Structures-in-C-520x274.jpg 520w\" sizes=\"auto, (max-width: 1302px) 100vw, 1302px\" \/><\/a><\/p>\n<p>Now, let us consider another scenario where you want to store an employee\u2019s records such as his name, age, and salary under a single unit. In this case, all the 3 records are of different types but can easily be clubbed into one with the help of structures.<\/p>\n<p><em><strong><a href=\"https:\/\/data-flair.training\/blogs\/union-in-c-language\/\">Unveil the Difference between Structures and Unions in C<\/a><\/strong><\/em><\/p>\n<p><strong>Here is a program in C that illustrates how to solve the above problem:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include &lt;stdio.h&gt;\r\nstruct employee\r\n{\r\nchar name[30];\r\nint age;\r\nfloat salary;\r\n};\r\nint main()\r\n{\r\n\r\nstruct employee e = {\"Rachel\", 29, 60000}; \/\/ Here e is an object of the structure employee\r\n\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\n\r\nprintf(\"The name is: %s\\n\",e.name);\r\nprintf(\"The age is: %d\\n\",e.age);\r\nprintf(\"The salary is: %0.2f\\n\",e.salary);\r\nreturn 0; \r\n}<\/pre>\n<p><strong>Code-\u00a0<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-Example.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59397\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-Example.jpg\" alt=\"Structures in C with Example\" width=\"1301\" height=\"691\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-Example.jpg 1301w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-Example-150x80.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-Example-300x159.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-Example-768x408.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-Example-1024x544.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-Example-520x276.jpg 520w\" sizes=\"auto, (max-width: 1301px) 100vw, 1301px\" \/><\/a><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-results.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59398\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-results.jpg\" alt=\"Structures in C with results\" width=\"1301\" height=\"680\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-results.jpg 1301w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-results-150x78.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-results-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-results-768x401.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-results-1024x535.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-with-results-520x272.jpg 520w\" sizes=\"auto, (max-width: 1301px) 100vw, 1301px\" \/><\/a><\/p>\n<h2>3. How to Create Structures in C?<\/h2>\n<p>A structure is created outside the main function, preferably before the main function. In order to access the data members of the structure, variable(s) are created either inside or outside the main function depending upon the choice of the programmer.<\/p>\n<p>The struct keyword is used to indicate the definition of a structure.<\/p>\n<p>Syntax of the body of the Structure-<\/p>\n<p><em>struct structure_name<\/em><br \/>\n<em>{<\/em><br \/>\n<em>data_type data_member1;<\/em><br \/>\n<em>data_type data_member2;<\/em><br \/>\n<em>data_type data_member3;<\/em><br \/>\n<em>.<\/em><\/p>\n<p><em>data_type data_membern;<\/em><br \/>\n<em>};<\/em><\/p>\n<p><em>For instance,<\/em><\/p>\n<p><em>struct book<\/em><br \/>\n<em>{<\/em><br \/>\n<em>char book_name[30];<\/em><br \/>\n<em>char author[30];<\/em><br \/>\n<em>int book_id;<\/em><br \/>\n<em>float price;<\/em><br \/>\n<em>};<\/em><\/p>\n<h2>4. How to Create Structure Variables?<\/h2>\n<p>As stated above, we can\u2019t directly access the data members of a structure. We need to create at least one variable to access the structure. The variable is responsible for reserving a particular block of memory for the structure according to its size.<\/p>\n<p><strong>There are 2 ways to create a variable to access data members in a structure:<\/strong><\/p>\n<p><strong>1.\u00a0<\/strong><strong>Inside the main function:<\/strong><\/p>\n<p><em>struct book<\/em><br \/>\n<em>{<\/em><br \/>\n<em>char book_name[30];<\/em><br \/>\n<em>char author[30];<\/em><br \/>\n<em>int book_id;<\/em><br \/>\n<em>float price;<\/em><br \/>\n<em>};<\/em><br \/>\n<em>int main()<\/em><br \/>\n<em>{<\/em><br \/>\n<em>struct book b; \/\/ Here b is a variable of structure book<\/em><br \/>\n<em>}<\/em><\/p>\n<p><strong>2. Outside the main function:<\/strong><\/p>\n<p><em>struct book<\/em><br \/>\n<em>{<\/em><br \/>\n<em>char book_name[30];<\/em><br \/>\n<em>char author[30];<\/em><br \/>\n<em>int book_id;<\/em><br \/>\n<em>float price;<\/em><br \/>\n<em>} b; \/\/ Here b is a variable of structure book.<\/em><\/p>\n<p><span style=\"font-size: 1rem;\">There is no difference in the way memory is allocated or how the data members are accessed through the variables in both cases.<\/span><\/p>\n<h2>5. How to access Data Members in Structures in C<\/h2>\n<p>There are basically two ways in order to access the data members in a structure through variable(s):<\/p>\n<ul>\n<li>With the help of the member operator\/ dot symbol (.)<\/li>\n<li>With the help of structure pointer operator (-&gt;)<\/li>\n<\/ul>\n<p>Suppose you want to access the data member book_id from the structure book, this is how you would do it using the member operator.<\/p>\n<p><strong>b.book_id;<\/strong><\/p>\n<p>For simplicity sake, we would prefer to use the dot operator in most of the cases. We will discuss the structure pointer operator in detail in the later section as it involves the use of pointers.<\/p>\n<p><strong>Let us merge together all the concepts involved in creating a structure by implementing a program in C to take input and display the details of a book using structures:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include&lt;stdio.h&gt;\r\nstruct book\r\n{\r\nchar book_name[30];\r\nchar author[30];\r\nint book_id;\r\nfloat price;\r\n};\r\n\r\nint main()\r\n{\r\n\r\nstruct book b; \/\/ Here b is a variable of structure book\r\n\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\n\r\nprintf(\"Enter the book name: \");\r\nfgets(b.book_name, 30, stdin);\r\nprintf(\"Enter the author name: \");\r\nfgets(b.author, 30, stdin);\r\nprintf(\"Enter the book ID: \");\r\nscanf(\"%d\",&amp;b.book_id);\r\nprintf(\"Enter the book price: \");\r\nscanf(\"%f\",&amp;b.price);\r\n\r\nprintf(\"\\nThe details of the book are:\\n\\n\");\r\nprintf(\"The book name is: \");\r\nputs(b.book_name);\r\nprintf(\"The author name is: \");\r\nputs(b.author);\r\nprintf(\"The book ID is: %d\\n\\n\",b.book_id);\r\nprintf(\"The book price is: %0.2f\\n\",b.price);\r\nreturn 0;\r\n}\r\n\r\n<\/pre>\n<p><strong>Code &#8211;\u00a0<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/How-to-create-Structures-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59400\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/How-to-create-Structures-in-C.jpg\" alt=\"Creating Structures in C\" width=\"1300\" height=\"686\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/How-to-create-Structures-in-C.jpg 1300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/How-to-create-Structures-in-C-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/How-to-create-Structures-in-C-300x158.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/How-to-create-Structures-in-C-768x405.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/How-to-create-Structures-in-C-1024x540.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/How-to-create-Structures-in-C-520x274.jpg 520w\" sizes=\"auto, (max-width: 1300px) 100vw, 1300px\" \/><\/a><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59402\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C.jpg\" alt=\"Structures in C\" width=\"1300\" height=\"699\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C.jpg 1300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-150x81.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-300x161.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-768x413.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-1024x551.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structures-in-C-520x280.jpg 520w\" sizes=\"auto, (max-width: 1300px) 100vw, 1300px\" \/><\/a><\/p>\n<p><span style=\"font-size: 1rem;\"><strong>Key takeaway:<\/strong> It is important to note that in structures, only data members can be defined, they can\u2019t be initialized a specific value inside its definition. Also, functions cannot be declared within a structure.<\/span><\/p>\n<p><strong>Here is a code in C that illustrates what happens when we try to initialize data members and declare member functions:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include&lt;stdio.h&gt;\r\nstruct DataFlair\r\n{\r\nint number = 5; \/\/ Compilation error\r\nchar character = 'D'; \/\/ Compilation error\r\nfloat fraction = 33.33; \/\/ Compilation error\r\n};\r\n\r\nint main()\r\n{\r\n\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\n\r\nstruct DataFlair d;\r\nprintf(\"The number is: %d\\n\",d.number);\r\nprintf(\"The character is: %c\\n\",d.character);\r\nprintf(\"The fraction is: %f\\n\",d.fraction);\r\nreturn 0;\r\n}\r\n\r\n<\/pre>\n<p><strong>Code-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Initialize-and-declare-member-functions-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59406\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Initialize-and-declare-member-functions-in-C.jpg\" alt=\"Initialize and declare member functions in C\" width=\"1302\" height=\"693\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Initialize-and-declare-member-functions-in-C.jpg 1302w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Initialize-and-declare-member-functions-in-C-150x80.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Initialize-and-declare-member-functions-in-C-300x160.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Initialize-and-declare-member-functions-in-C-768x409.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Initialize-and-declare-member-functions-in-C-1024x545.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Initialize-and-declare-member-functions-in-C-520x277.jpg 520w\" sizes=\"auto, (max-width: 1302px) 100vw, 1302px\" \/><\/a><\/p>\n<h2>6. The array of Structures in C<\/h2>\n<p><em>Before discussing this topic, it is important to have a crystal clear understanding of <strong><a href=\"https:\/\/data-flair.training\/blogs\/arrays-in-c\/\">arrays in C<\/a>.<\/strong><\/em><\/p>\n<p>We already know that arrays and structures allow the grouping of elements under one roof, but if implemented together, arrays and structures can extend its functionality to another level.<\/p>\n<p>In order to understand the array of structures, let us consider the base problem at hand and make slight modifications. Suppose you want to take the input and display all the records of 3 books, you can do it in two ways:<\/p>\n<ul>\n<li>Create 5 variables to access the data members of the structure: b1, b2, and b3.<\/li>\n<li>Create an array of structures b[3].<\/li>\n<\/ul>\n<p>What sounds more convenient and easy to implement? Obviously the 2nd method.<br \/>\nThis is where the array of structures comes into play.<\/p>\n<p><strong>Here is a code in C that illustrates the implementation of the array of structures with reference to the above-stated problem:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include&lt;stdio.h&gt;\r\nstruct book\r\n{\r\nchar book_name[30];\r\nchar author[30];\r\nint book_id;\r\nfloat price;\r\n};\r\n\r\nint main()\r\n{\r\n\r\nstruct book b[3]; \/\/ Here b is a variable of structure book\r\nint i;\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\n\r\nprintf(\"Enter the record of 5 books:\\n\");\r\nfor(i = 0; i &lt; 3; i ++)\r\n{\r\nprintf(\"Enter the book name: \");\r\nscanf(\"%s\",b[i].book_name);\r\nfgets(b[i].book_name, 80, stdin);\r\nprintf(\"Enter the author name: \");\r\nfgets(b[i].author, 80, stdin); \r\nprintf(\"Enter the book ID: \");\r\nscanf(\"%d\",&amp;b[i].book_id);\r\nprintf(\"Enter the book price: \");\r\nscanf(\"%f\",&amp;b[i].price);\r\nfflush(stdin);\r\n}\r\nprintf(\"\\nThe details of the book are:\\n\\n\");\r\nfor(i = 0; i &lt; 3; i++)\r\n{\r\nprintf(\"The book name is: \");\r\nputs(b[i].book_name);\r\nprintf(\"The author name is: \");\r\nputs(b[i].author);\r\nprintf(\"The book ID is: %d\\n\",b[i].book_id);\r\nprintf(\"The book price is: %0.2f\\n\",b[i].price);\r\n}\r\nreturn 0;\r\n}<\/pre>\n<p><strong>Code-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/array-of-Structures-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59418\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/array-of-Structures-in-C.jpg\" alt=\"Example of array of Structures in C\" width=\"1301\" height=\"698\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/array-of-Structures-in-C.jpg 1301w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/array-of-Structures-in-C-150x80.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/array-of-Structures-in-C-300x161.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/array-of-Structures-in-C-768x412.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/array-of-Structures-in-C-1024x549.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/array-of-Structures-in-C-520x279.jpg 520w\" sizes=\"auto, (max-width: 1301px) 100vw, 1301px\" \/><\/a><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-array-of-Structures-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59419\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-array-of-Structures-in-C.jpg\" alt=\"Output of array of Structures in C\" width=\"1303\" height=\"729\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-array-of-Structures-in-C.jpg 1303w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-array-of-Structures-in-C-150x84.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-array-of-Structures-in-C-300x168.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-array-of-Structures-in-C-768x430.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-array-of-Structures-in-C-1024x573.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-array-of-Structures-in-C-520x291.jpg 520w\" sizes=\"auto, (max-width: 1303px) 100vw, 1303px\" \/><\/a><\/p>\n<h2>7. Typedef in C<\/h2>\n<p>We have already discusse<strong>d\u00a0<\/strong>how<em><a href=\"https:\/\/data-flair.training\/blogs\/typedef-in-c\/\"><strong> typedef in C<\/strong><\/a>\u00a0<\/em>helps in simplifying the syntax of structures.<\/p>\n<h2>8. C Nested Structures<\/h2>\n<p>A nested structure is basically a structure within a structure. Sometimes we might encounter problems where simply the clubbing together of primitive data types might not help, rather we would require a more complex solution.<\/p>\n<p>We might require the clubbing of 2 user-defined data types, such as the array of structures or nested structures.<\/p>\n<p>Since we have already discussed what array of structures are and how to implement it, let\u2019s move on towards nested structures.<\/p>\n<p>Suppose we want to access the marks of a student in 3 subjects, namely physics chemistry and mathematics along with the details of the student such as his name, age, and gender.<\/p>\n<p>We can solve this problem by creating two structures, one for accessing the marks in respective subjects and the other to access the student details.<\/p>\n<p><strong>The nested structure would somewhat look like this:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">struct Marks\r\n{\r\nfloat physics;\r\nfloat chemistry;\r\nfloat mathematics;\r\n};\r\nstruct Student\r\n{\r\nchar name[20];\r\nint age;\r\nMarks m; \/\/ Here m is a variable for the structure Marks \r\n}; Student s; \/\/ Here s is a variable for the structure Student\r\n\r\n<\/pre>\n<p>Here, the main structure is Student within which we have declared another structure called Marks.<\/p>\n<p><strong>Here is a code in C that illustrates how a nested structure works with reference to the above-stated problem:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include&lt;stdio.h&gt;\r\n#include&lt;string.h&gt;\r\nstruct Marks\r\n{\r\nfloat physics;\r\nfloat chemistry;\r\nfloat mathematics;\r\n};\r\nstruct Student\r\n{\r\nchar name[20];\r\nint age;\r\nstruct Marks m; \/\/ Here m is a variable for the structure Marks\r\n}s; \/\/ Here s is a variable for the structure Student\r\n\r\nint main()\r\n{\r\n\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\nprintf(\"Enter student name: \");\r\nfgets(s.name, 20, stdin);\r\nprintf(\"Enter student age: \");\r\nscanf(\"%d\",&amp;s.age);\r\nprintf(\"\\nEnter the marks in the following subjects:\\n\");\r\nprintf(\"Physics: \");\r\nscanf(\"%f\",&amp;s.m.physics);\r\nprintf(\"Chemistry: \");\r\nscanf(\"%f\",&amp;s.m.chemistry);\r\nprintf(\"Mathematics: \");\r\nscanf(\"%f\",&amp;s.m.mathematics);\r\nprintf(\"\\nThe student details are:\\n\\n\");\r\nprintf(\"Physics: %0.2f\\n\",s.m.physics);\r\nprintf(\"Chemistry: %0.2f\\n\",s.m.chemistry);\r\nprintf(\"Mathematics: %0.2f\\n\",s.m.mathematics);\r\nreturn 0;\r\n}\r\n\r\n<\/pre>\n<p><strong>Code-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-C-Nested-Structures-.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59424\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-C-Nested-Structures-.jpg\" alt=\"Example of C Nested Structures\u00a0\" width=\"1304\" height=\"694\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-C-Nested-Structures-.jpg 1304w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-C-Nested-Structures--150x80.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-C-Nested-Structures--300x160.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-C-Nested-Structures--768x409.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-C-Nested-Structures--1024x545.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-C-Nested-Structures--520x277.jpg 520w\" sizes=\"auto, (max-width: 1304px) 100vw, 1304px\" \/><\/a><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-C-Nested-Structures-.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59427\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-C-Nested-Structures-.jpg\" alt=\"Output of C Nested Structures\u00a0\" width=\"1305\" height=\"734\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-C-Nested-Structures-.jpg 1305w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-C-Nested-Structures--150x84.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-C-Nested-Structures--300x169.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-C-Nested-Structures--768x432.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-C-Nested-Structures--1024x576.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-C-Nested-Structures--520x292.jpg 520w\" sizes=\"auto, (max-width: 1305px) 100vw, 1305px\" \/><\/a><\/p>\n<h2>9. Array within a Structure<\/h2>\n<p>We can solve the same problem using the concept of arrays within a structure.<\/p>\n<p><strong>Key takeaway:<\/strong> It is important to note that the array of structures and array within a structure are 2 entirely different concepts.<\/p>\n<p><em><strong>Discover the important concept of <a href=\"https:\/\/data-flair.training\/blogs\/multi-dimensional-arrays-in-c\/\">Multi-dimensional Arrays<\/a><\/strong><\/em><\/p>\n<p>This is how you could have used array within a structure since marks of the 3 subjects would be of similar data type, that is, float.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">struct Student\r\n{\r\nchar name[30];\r\nint age;\r\nfloat marks[3];\r\n\r\n\/* Index 0: physics, Index 1- chemistry, Index 2- mathematics *\/\r\n\r\n}s;\r\n\r\nThis is how you would access the array within a structure:\r\n\r\nS.marks[1] \/\/ To access the marks obtained in chemistry.<\/pre>\n<p><strong>Here is a code in C that illustrates the use of array within a structure to implement the use of array within a structure:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include&lt;stdio.h&gt;\r\nstruct Student\r\n{\r\nchar name[20];\r\nint age;\r\nfloat marks[3]; \/\/ Array within a structure\r\n}s; \/\/ Here s is a variable for the structure Student\r\n\r\nint main()\r\n{\r\nint i;\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\nprintf(\"Enter student name: \");\r\nfgets(s.name, 20, stdin);\r\nprintf(\"Enter student age: \");\r\nscanf(\"%d\",&amp;s.age);\r\nprintf(\"Enter the marks in physics, chemistry and mathematics respectively: \");\r\nfor(i=0;i&lt;3;i++)\r\n{\r\nscanf(\"%f\",&amp;s.marks[i]);\r\n}\r\nprintf(\"\\nThe student details are:\\n\\n\");\r\nputs(s.name);\r\nprintf(\"%d\\n\",s.age);\r\nprintf(\"The marks in physics, chemistry and mathematics:\\n\");\r\nfor(i=0;i&lt;3;i++)\r\n{\r\nprintf(\"%0.2f\\n\",s.marks[i]);\r\n}\r\nreturn 0;\r\n}<\/pre>\n<p><strong>Code-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Array-within-a-Structure-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59428\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Array-within-a-Structure-in-C.jpg\" alt=\" Array within a Structure with Example\" width=\"1300\" height=\"684\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Array-within-a-Structure-in-C.jpg 1300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Array-within-a-Structure-in-C-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Array-within-a-Structure-in-C-300x158.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Array-within-a-Structure-in-C-768x404.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Array-within-a-Structure-in-C-1024x539.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-Array-within-a-Structure-in-C-520x274.jpg 520w\" sizes=\"auto, (max-width: 1300px) 100vw, 1300px\" \/><\/a><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Array-within-a-Structure.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59430\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Array-within-a-Structure.jpg\" alt=\"Output of Array within a Structure\" width=\"1305\" height=\"688\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Array-within-a-Structure.jpg 1305w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Array-within-a-Structure-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Array-within-a-Structure-300x158.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Array-within-a-Structure-768x405.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Array-within-a-Structure-1024x540.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-Array-within-a-Structure-520x274.jpg 520w\" sizes=\"auto, (max-width: 1305px) 100vw, 1305px\" \/><\/a><\/p>\n<h2>10. Structures to a Function<\/h2>\n<p>Before discussing this topic, it is important to have a crystal clear understanding of <a href=\"https:\/\/data-flair.training\/blogs\/functions-in-c\/\"><em><strong>functions in C<\/strong><\/em><\/a>.<\/p>\n<p>We already know how to pass arguments of different data types to a function. Since a structure is nothing but a user-defined data type, it is not an alien concept to pass a structure to a function. We pass structures to a function when the structure is local to a function.<\/p>\n<p>We can pass structures to a function in 2 ways:<\/p>\n<ul>\n<li>Call by value<\/li>\n<li>Call by reference<\/li>\n<\/ul>\n<p>We will mainly discuss how to pass structures to a function using call by value and then later on briefly discuss how to do the same using call by reference.<\/p>\n<p>Suppose we have a structured box with data members as its dimensions, namely, length, width and height and we wish to create a function to display the dimensions of the box, we need to pass the structures to the function as an argument.<\/p>\n<p><strong>Here is a code in C that illustrates passing a structure to a function with reference to the above-stated problem:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include&lt;stdio.h&gt;\r\nstruct box\r\n{\r\nfloat length;\r\nfloat width;\r\nfloat height;\r\n};\r\nvoid display(struct box b);\r\nint main()\r\n{\r\n\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\n\r\nstruct box b;\r\n{\r\nprintf(\"Enter the dimensions of the box:\\n\\n\");\r\nprintf(\"Length: \");\r\nscanf(\"%f\",&amp;b.length);\r\nprintf(\"Width: \");\r\nscanf(\"%f\",&amp;b.width);\r\nprintf(\"Height: \");\r\nscanf(\"%f\",&amp;b.height);\r\ndisplay(b);\r\n}\r\nreturn 0;\r\n}\r\nvoid display(struct box b)\r\n{\r\nprintf(\"Length: %0.2f\\n\", b.length);\r\nprintf(\"Width: %0.2f\\n\", b.width);\r\nprintf(\"Height: %0.2f\\n\", b.height);\r\n}\r\n\r\n<\/pre>\n<p><strong>Code-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-structure-to-a-function-.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59434\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-structure-to-a-function-.jpg\" alt=\"Example of structure to a function in C\" width=\"1302\" height=\"699\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-structure-to-a-function-.jpg 1302w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-structure-to-a-function--150x81.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-structure-to-a-function--300x161.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-structure-to-a-function--768x412.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-structure-to-a-function--1024x550.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-structure-to-a-function--520x279.jpg 520w\" sizes=\"auto, (max-width: 1302px) 100vw, 1302px\" \/><\/a><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-structure-to-a-function.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59438\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-structure-to-a-function.jpg\" alt=\"Output of structure to a function\" width=\"1308\" height=\"692\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-structure-to-a-function.jpg 1308w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-structure-to-a-function-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-structure-to-a-function-300x159.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-structure-to-a-function-768x406.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-structure-to-a-function-1024x542.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-structure-to-a-function-520x275.jpg 520w\" sizes=\"auto, (max-width: 1308px) 100vw, 1308px\" \/><\/a><\/p>\n<p>Another point to be noted is that structures to a function can be passed in another way. In the previous method, we passed the entire structure to the function. The alternate method proves to be more flexible as it allows to pass individual data members of the structure to the function.<\/p>\n<p><strong>We can implement the above-stated problem in this manner:<\/strong><\/p>\n<p><em>struct box<\/em><br \/>\n<em>{<\/em><br \/>\n<em>float length;<\/em><br \/>\n<em>float width;<\/em><br \/>\n<em>float height;<\/em><br \/>\n<em>}b;<\/em><\/p>\n<p>Then,<\/p>\n<p><strong>void output(b.length, b.width,b.height)<\/strong><\/p>\n<p>Let us consider a problem where structures to a function are passed by the call by reference method to calculate the sum of 2 distances.<\/p>\n<h2>11. Structures using Pointers<\/h2>\n<p>Before discussing this topic, it is important to have a crystal clear understanding of pointers in C.<\/p>\n<p>The C programming language gives the programmer the provision to access structures with the help of pointers.<\/p>\n<p>We can access structures with the help of pointers in the following manner:<\/p>\n<p><em>struct structure_name<\/em><br \/>\n<em>{<\/em><br \/>\n<em>data_type data_member1;<\/em><br \/>\n<em>data_type data_member2;<\/em><br \/>\n<em>data_type data_member3;<\/em><br \/>\n<em>data_type data_membern;<\/em><br \/>\n<em>};<\/em><br \/>\n<em>int main()<\/em><br \/>\n<em>{<\/em><br \/>\n<em>struct structure_name *p; \/\/ Here *p is a pointer to the structure structure_name<\/em><br \/>\n<em>return 0;<\/em><br \/>\n<em>}<\/em><\/p>\n<h2>12.How to access Structures through Pointers?<\/h2>\n<p>Here is a code in C that illustrates how structures can be accessed with the help of pointers with reference to the box problem discussed earlier in the previous section.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include &lt;stdio.h&gt;\r\nstruct box\r\n{\r\nfloat length;\r\nfloat width;\r\nfloat height;\r\n}b;\r\n\r\n\r\nint main()\r\n{\r\n\r\nprintf(\"Welcome to DataFlair tutorials!\\n\\n\");\r\n\r\nstruct box *box_pointer, box1;\r\nbox_pointer = &amp;box1; \r\nprintf(\"Enter the dimensions of the box:\\n\\n\");\r\nprintf(\"Length: \");\r\nscanf(\"%f\", &amp;box_pointer-&gt;length);\r\nprintf(\"Width: \");\r\nscanf(\"%f\", &amp;box_pointer-&gt;width);\r\nprintf(\"Height: \");\r\nscanf(\"%f\", &amp;box_pointer-&gt;height);\r\n\r\nprintf(\"The dimensions of the box are:\\n\");\r\nprintf(\"Length: %0.2f\\n\", box_pointer-&gt;length);\r\nprintf(\"Width: %0.2f\\n\", box_pointer-&gt;width);\r\nprintf(\"Height: %0.2f\\n\", box_pointer-&gt;height);\r\nreturn 0; \r\n}\r\n\r\n<\/pre>\n<p><strong>Code<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-access-Structures-through-Pointers-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59440\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-access-Structures-through-Pointers-in-C.jpg\" alt=\"Example of access Structures through Pointers in C\" width=\"1301\" height=\"681\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-access-Structures-through-Pointers-in-C.jpg 1301w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-access-Structures-through-Pointers-in-C-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-access-Structures-through-Pointers-in-C-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-access-Structures-through-Pointers-in-C-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-access-Structures-through-Pointers-in-C-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Example-of-access-Structures-through-Pointers-in-C-520x272.jpg 520w\" sizes=\"auto, (max-width: 1301px) 100vw, 1301px\" \/><\/a><\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-access-Structures-through-Pointers.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-59443\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-access-Structures-through-Pointers.jpg\" alt=\"Output of access Structures through Pointers\" width=\"1302\" height=\"698\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-access-Structures-through-Pointers.jpg 1302w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-access-Structures-through-Pointers-150x80.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-access-Structures-through-Pointers-300x161.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-access-Structures-through-Pointers-768x412.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-access-Structures-through-Pointers-1024x549.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Output-of-access-Structures-through-Pointers-520x279.jpg 520w\" sizes=\"auto, (max-width: 1302px) 100vw, 1302px\" \/><\/a><\/p>\n<h2>13. Structures in C vs C++<\/h2>\n<p>We already know that C++ refers to C with classes. One of the salient features of C++ is that it supports <a href=\"https:\/\/en.wikipedia.org\/wiki\/Object-oriented_programming\">object-oriented programming<\/a>. OOP supports the implementation of classes.<\/p>\n<p>Classes are not available in C and hence it is safe to say that in C++, a structure is a class that can be declared with the help of the keyword struct.<\/p>\n<p>The striking difference between a structure and a class is that a structure is public by default, that is, it can be accessed anywhere inside the entire program, whereas a class is private by default but can be changed to public or protected mode as per the user\u2019s requirement.<\/p>\n<p>To be precise, a structure is a collection of only data members and a class is a collection of data members plus member functions.<\/p>\n<p>In this way, we can differentiate both of them-<\/p>\n<h5>Structures in C<\/h5>\n<p><em>struct structure_name<\/em><br \/>\n<em>{<\/em><\/p>\n<p><em>\/\/ Data member declarations<\/em><\/p>\n<p><em>data_type data_member1;<\/em><br \/>\n<em>data_type data_member2;<\/em><br \/>\n<em>data_type data_member3;<\/em><br \/>\n<em>.<\/em><br \/>\n<em>.<\/em><br \/>\n<em>.<\/em><br \/>\n<em>data_type data_membern;<\/em><br \/>\n<em>};<\/em><\/p>\n<h5>Structures in C++<\/h5>\n<p><em>struct structure_name<\/em><br \/>\n<em>{<\/em><br \/>\n<em>[public:] [private:] [protected:]<\/em><\/p>\n<p><em>\/* Data members and member functions declarations *\/<\/em><\/p>\n<p><em>data_type data_member1;<\/em><br \/>\n<em>data_type data_member2;<\/em><br \/>\n<em>data_type data_member3;<\/em><br \/>\n<em>.<\/em><br \/>\n<em>.<\/em><br \/>\n<em>.<\/em><br \/>\n<em>data_type data_membern;<\/em><\/p>\n<p><em>return_type member_function1;<\/em><br \/>\n<em>return_type member_function2;<\/em><br \/>\n<em>return_type member_function3;<\/em><br \/>\n<em>.<\/em><br \/>\n<em>.<\/em><br \/>\n<em>.<\/em><br \/>\n<em>return_type member_functionn;<\/em><br \/>\n<em>};<\/em><\/p>\n<p><em><strong><a href=\"https:\/\/data-flair.training\/blogs\/typecasting-in-c\/\">Typecasting in C<\/a> &#8211; An interesting and important concept of C<\/strong><\/em><\/p>\n<h3>Quiz on Structures in C<\/h3>\n<div class=\"learndash user_has_no_access\"  id=\"learndash_post_97156\"><div class=\"learndash-wrapper\">\n\n<div class=\"ld-tabs ld-tab-count-1\">\n\t\n\t<div class=\"ld-tabs-content\">\n\t\t\n\t\t\t<div role=\"tabpanel\" tabindex=\"0\" aria-labelledby=\"content\" class=\"ld-tab-content ld-visible\" id=\"ld-tab-content-59381\">\n\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\n\t\t\t\n\t<\/div> <!--\/.ld-tabs-content-->\n\n<\/div> <!--\/.ld-tabs-->\n\t\t<div class=\"wpProQuiz_content\" id=\"wpProQuiz_306\" data-quiz-meta=\"{&quot;quiz_pro_id&quot;:306,&quot;quiz_post_id&quot;:97156}\">\n\t\t\t<div class=\"wpProQuiz_spinner\" style=\"display:none\">\n\t\t\t\t<div><\/div>\n\t\t\t<\/div>\n\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_time_limit\">\n\t<div class=\"time\">\n\t\tTime limit: <span>0<\/span>\t<\/div>\n\t<div class=\"wpProQuiz_progress\"><\/div>\n<\/div>\n<div class=\"wpProQuiz_checkPage\" style=\"display: none;\">\n\t<h4 class=\"wpProQuiz_header\">\n\tQuiz Summary\t<\/h4>\n\t<p><span>0<\/span> of 15 Questions completed<\/p>\t<p>Questions:<\/p>\n\t<div class=\"wpProQuiz_reviewSummary\"><\/div>\n\n\t\n\t<input type=\"button\" name=\"endQuizSummary\" value=\"Finish Quiz\" class=\"wpProQuiz_button\" \/> <\/div>\n<div class=\"wpProQuiz_infopage\" style=\"display: none;\">\n\t<h4>Information<\/h4>\n\t\t<input type=\"button\" name=\"endInfopage\" value=\"Finish Quiz\" class=\"wpProQuiz_button\" \/> <\/div>\n<div class=\"wpProQuiz_text\">\n\t\t<div>\n\t\t<input class=\"wpProQuiz_button\" type=\"button\" \n\t\tvalue=\"Start Quiz\" name=\"startQuiz\" \/>\t<\/div>\n<\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_lock\">\t\t\n\t<p>You have already completed the quiz before. Hence you can not start it again.<\/p><\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_loadQuiz\">\n\t<p>\n\t\tQuiz is loading&#8230;\t<\/p>\n<\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_startOnlyRegisteredUser\">\n\t<p>You must sign in or sign up to start the quiz.<\/p><\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_prerequisite\">\n\t<p>You must first complete the following: <span><\/span><\/p><\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_sending\">\n\t<h4 class=\"wpProQuiz_header\">Results<\/h4>\n\t<p>\n\t\t<div>\n\t\tQuiz complete. Results are being recorded.\t\t<\/div>\n\t\t<div>\n\t\t\t<dd class=\"course_progress\">\n\t\t\t\t<div class=\"course_progress_blue sending_progress_bar\" style=\"width: 0%;\">\n\t\t\t\t<\/div>\n\t\t\t<\/dd>\n\t\t<\/div>\n\t<\/p>\n<\/div>\n\n<div style=\"display: none;\" class=\"wpProQuiz_results\">\n\t<h4 class=\"wpProQuiz_header\">Results<\/h4>\n\t<p><span class=\"wpProQuiz_correct_answer\">0<\/span> of <span>15<\/span> Questions answered correctly<\/p>\t\t<p class=\"wpProQuiz_quiz_time\">\n\t\tYour time: <span><\/span>\t\t<\/p>\n\t\t\t<p class=\"wpProQuiz_time_limit_expired\" style=\"display: none;\">\n\tTime has elapsed\t<\/p>\n\n\t\t\t<p class=\"wpProQuiz_points\">\n\t\tYou have reached <span>0<\/span> of <span>0<\/span> point(s), (<span>0<\/span>)\t\t<\/p>\n\t\t<p class=\"wpProQuiz_graded_points\" style=\"display: none;\">\n\t\tEarned Point(s): <span>0<\/span> of <span>0<\/span>, (<span>0<\/span>)\t\t<br \/>\n\t\t<span>0<\/span> Essay(s) Pending (Possible Point(s): <span>0<\/span>)\t\t<br \/>\n\t\t<\/p>\n\t\t\n\t<div class=\"wpProQuiz_catOverview\" style=\"display:none;\">\n\t\t<h4>\n\t\tCategories\t\t<\/h4>\n\n\t\t<div style=\"margin-top: 10px;\">\n\t\t\t<ol>\n\t\t\t\t\t\t\t<li data-category_id=\"0\">\n\t\t\t\t\t<span class=\"wpProQuiz_catName\">Not categorized<\/span>\n\t\t\t\t\t<span class=\"wpProQuiz_catPercent\">0%<\/span>\n\t\t\t\t<\/li>\n\t\t\t\t\t\t\t<\/ol>\n\t\t<\/div>\n\t<\/div>\n\t<div>\n\t\t<ul class=\"wpProQuiz_resultsList\">\n\t\t\t\t\t\t\t<li style=\"display: none;\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/li>\n\t\t\t\t\t<\/ul>\n\t<\/div>\n\t\t<div class=\"ld-quiz-actions\" style=\"margin: 10px 0px;\">\n\t\t\t\t<div class='quiz_continue_link\n\t\t\t\t'>\n\n\t\t<\/div>\n\t\t\t\t\t<input class=\"wpProQuiz_button wpProQuiz_button_restartQuiz\" type=\"button\" name=\"restartQuiz\"\n\t\t\t\t\tvalue=\"Restart Quiz\"\/>\t\t\t\t\t\t<input class=\"wpProQuiz_button wpProQuiz_button_reShowQuestion\" type=\"button\" name=\"reShowQuestion\"\n\t\t\t\t\tvalue=\"View Questions\" \/>\t\t\t\t\t<\/div>\n<\/div>\n<div class=\"wpProQuiz_reviewDiv\" style=\"display: none;\">\n\t<div class=\"wpProQuiz_reviewQuestion\">\n\t<ol>\n\t\t\t\t\t<li>1<\/li>\n\t\t\t\t\t<li>2<\/li>\n\t\t\t\t\t<li>3<\/li>\n\t\t\t\t\t<li>4<\/li>\n\t\t\t\t\t<li>5<\/li>\n\t\t\t\t\t<li>6<\/li>\n\t\t\t\t\t<li>7<\/li>\n\t\t\t\t\t<li>8<\/li>\n\t\t\t\t\t<li>9<\/li>\n\t\t\t\t\t<li>10<\/li>\n\t\t\t\t\t<li>11<\/li>\n\t\t\t\t\t<li>12<\/li>\n\t\t\t\t\t<li>13<\/li>\n\t\t\t\t\t<li>14<\/li>\n\t\t\t\t\t<li>15<\/li>\n\t\t\t<\/ol>\n\t<div style=\"display: none;\"><\/div>\n<\/div>\n<div class=\"wpProQuiz_reviewLegend\">\n\t<ol>\n\t\t<li class=\"learndash-quiz-review-legend-item-current\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewQuestion_Target\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Current<\/span>\n\t\t<\/li>\n\t\t<li class=\"learndash-quiz-review-legend-item-review\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewColor_Review\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Review \/ Skip<\/span>\n\t\t<\/li>\n\t\t<li class=\"learndash-quiz-review-legend-item-answered\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewColor_Answer\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Answered<\/span>\n\t\t<\/li>\n\t\t<li class=\"learndash-quiz-review-legend-item-correct\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewColor_AnswerCorrect\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Correct<\/span>\n\t\t<\/li>\n\t\t<li class=\"learndash-quiz-review-legend-item-incorrect\">\n\t\t\t<span class=\"wpProQuiz_reviewColor wpProQuiz_reviewColor_AnswerIncorrect\"><\/span>\n\t\t\t<span class=\"wpProQuiz_reviewText\">Incorrect<\/span>\n\t\t<\/li>\n\t<\/ol>\n\t<div style=\"clear: both;\"><\/div>\n<\/div>\n<div class=\"wpProQuiz_reviewButtons\">\n\t\t\t<input type=\"button\" name=\"review\" value=\"Review Question\" class=\"wpProQuiz_button2\" style=\"float: left; display: block;\"> \t\t\t\t\t<input type=\"button\" name=\"quizSummary\" value=\"Quiz Summary\" class=\"wpProQuiz_button2\" style=\"float: right;\"> \t\t\t\t<div style=\"clear: both;\"><\/div>\n\t<\/div>\n<\/div>\n<div class=\"wpProQuiz_quizAnker\" style=\"display: none;\"><\/div>\n<div style=\"display: none;\" class=\"wpProQuiz_quiz\">\n\t<ol class=\"wpProQuiz_list\">\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4716,&quot;question_post_id&quot;:97157}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>1<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>1<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct test<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">int x=10;<\/span><\/p>\n<p><span style=\"font-weight: 400\">int y=20;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}d;<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;d.x&lt;&lt;&#8221; &#8220;&lt;&lt;d.y;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4716\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4716\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 20 10\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4716\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4716\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> Compilation Error \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4716\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 10 20\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4717,&quot;question_post_id&quot;:97158}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>2<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>2<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct test<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">string name;<\/span><\/p>\n<p><span style=\"font-weight: 400\">int marks;<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct test arr[2];<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[0].name=&#8221;David&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[0].marks=10;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[1].name= &#8220;John&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;arr[1].name&lt;&lt;&#8221; &#8220;&lt;&lt;arr[0].marks;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4717\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4717\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> David 10\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4717\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 10 10 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4717\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> John 10 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4717\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> David John\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4718,&quot;question_post_id&quot;:97159}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>3<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>3<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct designsquare<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">int side;<\/span><\/p>\n<p><span style=\"font-weight: 400\">designsquare(int x)<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">side=x;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">void areaofsquare(){<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">cout&lt;&lt;side*side;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct designsquare DS= designsquare(4);<\/span><\/p>\n<p><span style=\"font-weight: 400\">DS.areaofsquare();<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4718\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4718\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 16 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4718\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 4 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4718\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4718\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 8\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4719,&quot;question_post_id&quot;:97160}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>4<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>4<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct test<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int x;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int y;<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct test t ={4,6};<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct test* t1=&amp;t;<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;t1-&gt;x;<\/span><\/p>\n<p><span style=\"font-weight: 400\">return 0;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4719\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4719\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 6\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4719\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 0x7ff\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4719\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 4\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4719\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4720,&quot;question_post_id&quot;:97161}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>5<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>5<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct area<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int l;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0float b;<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0area *ptr, x;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0ptr=&amp;x;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0x.l=10;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0x.b=20.1;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0cout&lt;&lt;x.l&lt;&lt;&#8220;, &#8220;&lt;&lt;ptr-&gt;b;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4720\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4720\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> 10, 20.1\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4720\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\">  20.1, 10\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4720\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 10, garbage value\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4720\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 10, 0\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4721,&quot;question_post_id&quot;:97162}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>6<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>6<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct student<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0string name;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int rollno;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int age;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}s1,s2,s3;<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">s1.name=&#8221;jai&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">s3.age=10;<\/span><\/p>\n<p><span style=\"font-weight: 400\">s3.rollno=20;<\/span><\/p>\n<p><span style=\"font-weight: 400\">s3.name=s1.name;<\/span><\/p>\n<p><span style=\"font-weight: 400\">s2=s3;<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;s2.name&lt;&lt;&#8220;, &#8220;&lt;&lt;s2.age;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4721\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4721\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\">  jai, 0 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4721\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> jai, 10\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4721\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 10, 20\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4721\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> garbage value, garbage value\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4722,&quot;question_post_id&quot;:97163}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>7<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>7<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct student<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0string name;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int rollno;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int age;<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct student arr[3];<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[0].name=&#8221;david&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[0].age= 10;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[0].rollno= 15;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[1]=arr[0];<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[2]=arr[1];<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;arr[0].name&lt;&lt;&#8220;, &#8220;&lt;&lt;arr[1].age&lt;&lt;&#8220;, &#8220;&lt;&lt;arr[2].rollno;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4722\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4722\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> david, 0, 0 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4722\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> david, 10, 15 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4722\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> david,15, 10 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4722\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> Compilation error\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4723,&quot;question_post_id&quot;:97164}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>8<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>8<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct structure<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int x,y;<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct structure arr[2], *ptr;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[1].x=10; arr[1].y=20;<\/span><\/p>\n<p><span style=\"font-weight: 400\">ptr=arr;<\/span><\/p>\n<p><span style=\"font-weight: 400\">*ptr++;<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;ptr-&gt;x;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4723\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4723\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> garbage value\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4723\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 2: 10\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4723\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 20 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4723\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4724,&quot;question_post_id&quot;:97165}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>9<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>9<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct student<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0string name;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int rollno;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int age;<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct student arr[2], *ptr;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[0].name=&#8221;david&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[0].age= 10;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[0].rollno= 15;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[1]=arr[0];<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[1].name=&#8221;ram&#8221;;<\/span><\/p>\n<p><span style=\"font-weight: 400\">arr[1].rollno=20;<\/span><\/p>\n<p><span style=\"font-weight: 400\">ptr=arr;<\/span><\/p>\n<p><span style=\"font-weight: 400\">cout&lt;&lt;arr[1].name&lt;&lt;&#8220;, &#8220;&lt;&lt;arr[0].age&lt;&lt;&#8220;, &#8220;&lt;&lt;ptr-&gt;rollno;<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4724\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4724\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> ram, 10, 15 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4724\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> ram,10, 20 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4724\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> ram 20, 10 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4724\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> ram, 0, 0\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4725,&quot;question_post_id&quot;:97166}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>10<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>10<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p>What will be the output of the following program?<\/p>\n<p><span style=\"font-weight: 400\">#include &lt;iostream&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">#include &lt;string.h&gt;<\/span><\/p>\n<p><span style=\"font-weight: 400\">using namespace std;<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct triangle<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0int b,h;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0triangle(int b, int h)<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0{<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400\">cout&lt;&lt;0.5*b*h;<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0\u00a0}<\/span><\/p>\n<p><span style=\"font-weight: 400\">};<\/span><\/p>\n<p><span style=\"font-weight: 400\">int main()<\/span><\/p>\n<p><span style=\"font-weight: 400\">{<\/span><\/p>\n<p><span style=\"font-weight: 400\">struct triangle t1=triangle(4,6);<\/span><\/p>\n<p><span style=\"font-weight: 400\">}<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4725\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4725\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> Compilation Error\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4725\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> 4\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4725\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> 6 \t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4725\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> 4: 12\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4726,&quot;question_post_id&quot;:97167}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>11<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>11<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">Access specifier for struct in c++ is by default:<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4726\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4726\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> Private\n\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4726\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> Public\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4726\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> Protected\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4726\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> None of the above\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4727,&quot;question_post_id&quot;:97168}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>12<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>12<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">\u00a0Memory allocation of structure takes place when:<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4727\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4727\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> structure is declared\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4727\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> structure variable is created\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4727\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> structure member function is called\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4727\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> None of the above\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4728,&quot;question_post_id&quot;:97169}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>13<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>13<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">What is the size of memory allocated to a structure?<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4728\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4728\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> size of the smallest data member\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4728\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> size of the largest data member\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4728\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> sum of the sizes of all the data members\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4728\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> difference of largest and smallest data member size\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4729,&quot;question_post_id&quot;:97170}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>14<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>14<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">struct is a:<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4729\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4729\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> identifier\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4729\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> Keyword\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4729\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> variable\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4729\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> operator\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t\t\t<li class=\"wpProQuiz_listItem\" style=\"display: none;\" data-type=\"single\" data-question-meta=\"{&quot;type&quot;:&quot;single&quot;,&quot;question_pro_id&quot;:4730,&quot;question_post_id&quot;:97171}\">\n\t\t\t\t<div class=\"wpProQuiz_question_page\" style=\"display:none;\" >\n\t\t\t\tQuestion <span>15<\/span> of <span>15<\/span>\t\t\t\t<\/div>\n\t\t\t\t<h5 style=\"display: inline-block;\" class=\"wpProQuiz_header\">\n\t\t\t\t\t<span>15<\/span>. Question\n\t\t\t\t<\/h5>\n\n\t\t\t\t\n\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_question\" style=\"margin: 10px 0px 0px 0px;\">\n\t\t\t\t\t<div class=\"wpProQuiz_question_text\">\n\t\t\t\t\t\t<p><span style=\"font-weight: 400\">What is not true about structure?<\/span><\/p>\n\t\t\t\t\t<\/div>\n\t\t\t\t\t<p class=\"wpProQuiz_clear\" style=\"clear:both;\"><\/p>\n\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t<ul class=\"wpProQuiz_questionList\" data-question_id=\"4730\"\n\t\t\t\t\t\tdata-type=\"single\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"0\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4730\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"1\"> any data member can be retrieved at a time\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"1\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4730\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"2\"> does not support flexible array\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4730\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"3\"> Each data member has its unique memory location\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li class=\"wpProQuiz_questionListItem\" data-pos=\"3\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"display:none;\"><\/span>\n\t\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"wpProQuiz_questionInput\" autocomplete=\"off\"\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"question_306_4730\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"4\"> can initialize several data member at once\t\t\t\t\t\t\t\t\t\t<\/label>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/ul>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_response\" style=\"display: none;\">\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_correct\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tCorrect\t\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<div style=\"display: none;\" class=\"wpProQuiz_incorrect\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\tIncorrect\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"wpProQuiz_AnswerMessage\"><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"skip\" value=\"Skip question\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left; margin-right: 10px ;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"back\" value=\"Back\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: left ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t\t\t\t\t<input type=\"button\" name=\"check\" value=\"Check\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right ; margin-right: 10px ; display: none;\"> \t\t\t\t\t\t\t\t<input type=\"button\" name=\"next\" value=\"Next\" class=\"wpProQuiz_button wpProQuiz_QuestionButton\" style=\"float: right; display: none;\"> \t\t\t\t\t\t\t\t<div style=\"clear: both;\"><\/div>\n\n\t\t\t\t\t\t\t<\/li>\n\n\t\t\t<\/ol>\n\t<\/div>\n\t\t<\/div>\n\t\t\n<\/div> <!--\/.learndash-wrapper-->\n<\/div>\n<h2>Summary<\/h2>\n<p>In this tutorial, we paved the way to optimize data representation by mastering the concepts of structures by learning how to group together logically related variables. We discussed structures in detail by shedding light on its significance and the various applications using arrays, functions, and pointers.<\/p>\n<p>Furthermore, if you have any query, feel free to ask in the comment section.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:1505,&quot;href&quot;:&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Object-oriented_programming&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251206234252\\\/https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/Object-oriented_programming&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-09 09:42:33&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2025-12-23 18:04:11&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-06 03:46:28&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-01-09 13:59:19&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-02 07:42:14&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-09 10:56:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-05 05:03:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-19 17:12:49&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-07 16:04:43&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-19 01:16:18&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-05-25 05:26:17&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-05 10:35:26&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-11 14:12:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-17 01:41:10&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-17 01:41:10&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So far, we discussed the various user-defined data types available in C such as union, enumeration, and typedef. But we are yet to discuss one of the most important user-defined data type called structures&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":59446,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[20150,20148,20146,20147,20149],"class_list":["post-59381","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-c-nested-structures","tag-c-structure-with-example","tag-c-structures-tutorial","tag-create-structure-variables","tag-create-structures-in-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Structures in C - Makes Coder Life Easy - DataFlair<\/title>\n<meta name=\"description\" content=\"Structures in C is cluster of variables that may be of different data types under the name name. Learn everything about Strcutures, importance, with array, functions, pointers\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/structures-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Structures in C - Makes Coder Life Easy - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Structures in C is cluster of variables that may be of different data types under the name name. Learn everything about Strcutures, importance, with array, functions, pointers\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/structures-in-c\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-15T11:08:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-10T08:26:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Structures in C - Makes Coder Life Easy - DataFlair","description":"Structures in C is cluster of variables that may be of different data types under the name name. Learn everything about Strcutures, importance, with array, functions, pointers","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/structures-in-c\/","og_locale":"en_US","og_type":"article","og_title":"Structures in C - Makes Coder Life Easy - DataFlair","og_description":"Structures in C is cluster of variables that may be of different data types under the name name. Learn everything about Strcutures, importance, with array, functions, pointers","og_url":"https:\/\/data-flair.training\/blogs\/structures-in-c\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2019-06-15T11:08:12+00:00","article_modified_time":"2021-06-10T08:26:24+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"16 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Structures in C &#8211; Makes Coder Life Easy","datePublished":"2019-06-15T11:08:12+00:00","dateModified":"2021-06-10T08:26:24+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/"},"wordCount":1985,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg","keywords":["C Nested Structures","C Structure with Example","C structures tutorial","Create Structure Variables","Create Structures in C"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/structures-in-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/","url":"https:\/\/data-flair.training\/blogs\/structures-in-c\/","name":"Structures in C - Makes Coder Life Easy - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg","datePublished":"2019-06-15T11:08:12+00:00","dateModified":"2021-06-10T08:26:24+00:00","description":"Structures in C is cluster of variables that may be of different data types under the name name. Learn everything about Strcutures, importance, with array, functions, pointers","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/structures-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/06\/Structure-in-C-Programming.jpg","width":802,"height":420,"caption":"Structure in C Programming"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/structures-in-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"C Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/c-programming\/"},{"@type":"ListItem","position":3,"name":"Structures in C &#8211; Makes Coder Life Easy"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/59381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=59381"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/59381\/revisions"}],"predecessor-version":[{"id":97209,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/59381\/revisions\/97209"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/59446"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=59381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=59381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=59381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}