answersLogoWhite

0

What else can I help you with?

Continue Learning about Engineering

How can structures be declared and used in c program?

You declare a structure as follows:struct name {typename_1 member_name_1; typename_2 member_name_2;// additional members...};


How you declare class scoped variables and member functions?

To scope class members to the class (rather than to instances of the class), declare them as static members of the class. Static members are accessible even when no instances of the class exist. As such, static member functions do not have access to a 'this' pointer, unlike ordinary (nonstatic) member functions.


Can additional methods of base class be hidden from the derived class in object oriented software?

Yes. During inheritance only the public members of the parent class are visible to the child class. If you declare a method or a variable as private, the child class cannot access it. In other words, the methods and variables are hidden from the derived class.


Which one is better between structure and union?

Sub:- C programming class:- f.y.b.sc(cs) name:-sintu mehta Union:- all member of the union share is storage in the computer memory 2. Only one member can be active at a time 3. Only first union variable can be initialized 4. Conservation the memoy


What are nested structures in C?

Structures can contain other structures as members; in other words, structures can nest. Consider the following two structure types: struct first_structure_type { int member_of_1; }; struct second_structure_type { double double_member; struct first_structure_type first_struct_member; }; The first structure type is incorporated as a member of the second structure type. You can initialize a variable of the second type as follows: struct second_structure_type second_struct_member; second_struct_member.double_member = 12345.6789; second_struct_member.first_struct_member.integer_member_of_1 = 5; The member operator . is used to access members of structures that are themselves members of a larger structure. No parentheses are needed to force a special order of evaluation; a member operator expression is simply evaluated from left to right. In principle, structures can be nested indefinitely. Ref: http://www.crasseux.com/books/ctutorial/Nested-structures.html

Related Questions

Who are the mandatory members for RS anf FS reviews?

The mandatory members for RS and FS reviews varies depending on the business. Some mandatory members include supervisors and HR members.


How do you access a structure member?

we can access and assign values of the members of a structure in a number of ways. as mentioned earlier, the members themselves are not variables .they should be linked to the structure variables in order to make them meaningful members . for example the word title , has no meaning whereas the phrase 'title of book3' .the link between a members and a variable is established using the members operator '.' which is also known as 'dot operator ' or ' period operator '.for example , book.priceis the variable representing the price of book1 and can be treated like any other ordinary variable


How do you access structure member?

we can access and assign values of the members of a structure in a number of ways. as mentioned earlier, the members themselves are not variables .they should be linked to the structure variables in order to make them meaningful members . for example the word title , has no meaning whereas the phrase 'title of book3' .the link between a members and a variable is established using the members operator '.' which is also known as 'dot operator ' or ' period operator '.for example , book.priceis the variable representing the price of book1 and can be treated like any other ordinary variable


How can structures be declared and used in c program?

You declare a structure as follows:struct name {typename_1 member_name_1; typename_2 member_name_2;// additional members...};


What is meant by structure in c?

A structure is an aggregate of two or more data types, each of which has a unique address within the structure. The structure members need not be the same type. Structures are akin to a database record where members represent the record's fields. The size of a structure is not necessarily equal to the sum of its member sizes. For efficiency, members are typically aligned on an appropriate word boundary which may introduce gaps within the structure. To minimise these gaps, it is best to declare members in order of size, largest first.


How do you store character and integer using structure?

Declare a structure with integer and character data members in it. Eg:struct node{int integer;char character;};Now you can use this structure definition to store the values. Eg:struct node temp;//declaringtemp.integer = 5;temp.character = 'a';


What are the two ways of initializing a structure variable in c plus plus?

Two ways? There are at least four: 1) Zero the memory allocated to the structure. 2) Shallow-copy the memory from another structure of the same type. 3) Deep-copy the memory from another structure of the same type. 4) Set the individual members.


Which Super Junior members have complete mandatory conscription?

Only Kangin has complete his mandatory military service. Heechul is currently enlisted and Leeteuk plans to enlist soon.


How you declare class scoped variables and member functions?

To scope class members to the class (rather than to instances of the class), declare them as static members of the class. Static members are accessible even when no instances of the class exist. As such, static member functions do not have access to a 'this' pointer, unlike ordinary (nonstatic) member functions.


David asks each of his familty members what their favorite vegetable is list four possible values for this variable?

david asks each of his family members what their favorite vegatable is ?is he collecting data on a numerical or categorical variable?


What responsibilities do the members of the Legislative branch of the US government have?

They can declare war and make federal laws


The members of congress who wanted to declare war against Britain after the battle of tippecanoe?

War Hawks