Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

glibware soft solutions


{ City } 503
< Country > india
* Profession * business
User No # 125964
Total Questions Posted # 32
Total Answers Posted # 337

Total Answers Posted for My Questions # 44
Total Views for My Questions # 39050

Users Marked my Answers as Correct # 0
Users Marked my Answers as Wrong # 0
Answers / { glibware soft solutions }

Question { 844 }

What are access specifiers in C++?


Answer

• Private: Members are accessible only within the class.
• Protected: Accessible within the class and derived classes.
• Public: Accessible from outside the class.

Is This Answer Correct ?    0 Yes 0 No

Question { 881 }

What is the use of the this pointer?


Answer

• It points to the calling object and is used to resolve scope issues, especially with member functions.

Is This Answer Correct ?    0 Yes 0 No


Question { 954 }

Explain RAII (Resource Acquisition Is Initialization).


Answer

• A programming idiom where resource allocation is tied to object lifetime. Destructors release resources.

Is This Answer Correct ?    0 Yes 0 No

Question { 1207 }

What is the difference between inline functions and macros?


Answer

1. Macros: Text substitution; no type checking.
2. Inline functions: Replaced at runtime; provide type checking and debugging benefits.

Is This Answer Correct ?    0 Yes 0 No

Question { 1207 }

What is the difference between inline functions and macros?


Answer

• Inline Functions: Type-checked, replace function calls with code during compilation.
• Macros: Preprocessor directive, no type-checking.

Is This Answer Correct ?    0 Yes 0 No

Question { 1100 }

What is the difference between const and constexpr?


Answer

• const: Value remains constant; evaluated at runtime.
• constexpr: Evaluated at compile time for optimization.

Is This Answer Correct ?    0 Yes 0 No

Question { 760 }

What are static variables, and where are they stored?


Answer

Static variables retain their value across multiple function calls. They are stored in the data segment of memory.

Is This Answer Correct ?    0 Yes 0 No

Question { 739 }

What is a const pointer, and how does it differ from a pointer to a const?


Answer

1. Pointer to const: The value being pointed to cannot be modified, but the pointer itself can change.
Example:
2. const int a = 10;
3. const int *ptr = &a; // *ptr is read-only
4. const pointer: The pointer cannot change, but the value it points to can.

Is This Answer Correct ?    0 Yes 0 No

Question { 851 }

. Explain the differences between fork() and exec() in C


Answer

1. fork(): Creates a new process (child) identical to the parent process.
2. exec(): Replaces the current process image with a new program.

Is This Answer Correct ?    0 Yes 0 No

Question { 1054 }

How does the C program handle segmentation faults?


Answer

Segmentation faults occur when invalid memory is accessed. Use debugging tools like gdb to analyze.

Is This Answer Correct ?    0 Yes 0 No

Question { 957 }

What is the difference between malloc() and realloc()?


Answer

• malloc(): Allocates memory.
• realloc(): Resizes an already allocated memory block, preserving existing data if possible.

Is This Answer Correct ?    0 Yes 0 No

Question { 1050 }

Explain the concept of "dangling pointers" in C.


Answer

A dangling pointer points to memory that has been deallocated. Accessing it causes undefined behavior.

Is This Answer Correct ?    0 Yes 0 No

Question { 976 }

How do you prevent buffer overflows in C?


Answer

• Use bounds checking while working with arrays.
• Use safer functions like snprintf() instead of sprintf().

Is This Answer Correct ?    0 Yes 0 No

Question { 804 }

What is the restrict keyword in C?


Answer

restrict is used with pointers to indicate that the object pointed to is accessed only through that pointer, enabling optimizations.

Is This Answer Correct ?    0 Yes 0 No

Question { 817 }

Explain the difference between struct and union.


Answer

• Struct: All members occupy separate memory.
• Union: All members share the same memory.

Is This Answer Correct ?    0 Yes 0 No

Prev    1   ... 3   ... 5   ... 7   ... 9   ... 11   ... 13   ... 15    17   [18]    19  ... 21   ... 23    Next