Join Our Email Alerts-Subscribe
Important Note:Login & Check Your Email Inbox and Activate Confirmation Link

Enter Your Email :

Copyright Disclaimer:
Section 107 of the Copyright Act Fair Use Contents .
We are forwarding content link(s) from our website to content website & We are not serving any contents.
Main the Content PDF link(s) is/are obtained from GoogleSearch
for the purpose of Education & Teaching Intention. Not for commercial purpose. is not liable/responsible for any copyright issues.

Placement Materials & Answers-Free Download

Software Companies Placement Papers With Answers- Alcatel Lucent-Free Download

1.32: What is the difference between char a[] = "string"; and char *p = "string"; ?

A: The first declares an initialized and modifiable array; the second declares a pointer initialized to a not-necessarily- modifiable constant string.

1.34: How do I initialize a pointer to a function?

A: Use something like "extern int func(); int (*fp)() = func;" .

Section 2. Structures, Unions, and Enumerations

2.1: What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?

A: The first structure is named by a tag, the second by a typedef name.

2.2: Why doesn't "struct x { ... }; x thestruct;" work?

A: C is not C++.

2.3: Can a structure contain a pointer to itself?

A: See question 1.14.

2.4: What's the best way of implementing opaque (abstract) data types in C?

A: One good way is to use structure pointers which point to structure types which are not publicly defined.

2.6: I came across some code that declared a structure with the last member an array of one element, and then did some tricky allocation to make it act like the array had several elements. Is this legal or portable?

A: An official interpretation has deemed that it is not strictly conforming with the C Standard.

2.7: I heard that structures could be assigned to variables and passed to and from functions, but K&R1 says not.

A: These operations are supported by all modern compilers.

2.8: Is there a way to compare structures automatically?

A: No.

2.10: Can I pass constant values to functions which accept structure arguments?

A: Not yet. As of this writing, C has no way of generating anonymous structure values.

2.11: How can I read/write structures from/to data files?

A: It is relatively straightforward to use fread and fwrite.

2.12: How can I turn off structure padding?

A: There is no standard method.

2.13: Why does sizeof report a larger size than I expect for a structure type?

A: The alignment of arrays of structures must be preserved.

2.14: How can I determine the byte offset of a field within a structure?

A: ANSI C defines the offsetof() macro, which should be used if available.

Source: Contents are provided by Technicalsymposium Google Group Members.
Disclaimer: All the above contents are provided by Google Group members.
Further, this content is not intended to be used for commercial purpose. is not liable/responsible for any copyright issues.

Placement Papers & Answers PDF-Download

Aptitude & Placement Papers & Answers PDF Study Materials PDF-Free Download Live Support-Chat with Our Experts

Official Contact: +91-9245556793 (Whatsapp Message / SMS / Voice Call)

Our Expert team is ready to answer all your questions immediately-Feel free to speak in Tamil/English.

(Example:Events info/Lecture Notes/Off-Campus & All Jobs/Projects & All education information)

Working hrs (IST): (Morning: 10:00AM-3:00 PM) and (Evening:5:00 PM to 10:00 PM)

All Latest Question & Answer Page (FAQ)-Click here