What's the difference between struct x1 { ... }; and
typedef struct { ... } x2; ?
Answers were Sorted based on User's Feedback
Answer / vikraman85
In the first its simply structure,by declaring structure
variable accessors we can access those elements inside the
structure..
eg.struct x1 a,b,c;
In the next one the x2 acts as a datatype..
b'coz of the typedef function..
we can use x2 as datatype for the further calculations like
int,float which are predefined datatypes,but this is
manually defined datatype..
| Is This Answer Correct ? | 16 Yes | 3 No |
Answer / guest
The first structure is named by a tag, the second by a typedef
name.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / esperto informatico
in theory, for my opiniol the difference is connected to
the use of memory.... the correct and easy answer it could
be that the first define a struct and a second define a
struct type.... =).....
| Is This Answer Correct ? | 0 Yes | 3 No |
Is c dynamically typed?
What are the different types of objects used in c?
what is the difference between call by value and call by reference?
5 Answers Genpact, Global Logic, Infosys,
Explain the process of converting a Tree into a Binary Tree.
Write a C/C++ program that connects to a MySQL server and checks intrusion attempts every 5 minutes. If an intrusion attempt is detected beep the internal speaker to alert the administrator. A high number of aborted connects to MySQL at a point in time may be used as a basis of an intrusion.
2 Answers Drona Solutions, Infosys, Vodafone, Webyog,
Write a factorial program using C.
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is the difference between void main and main in c?
will the program compile? int i; scanf(ā%dā,i); printf(ā%dā,i);
What is the difference between break and continue?
can we print any string in c language without using semicolon(;)(terminator) in whole program.
Which is the memory area not included in C program? give the reason