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...

nashi informatics solutions


{ City } chennai
< Country > india
* Profession *
User No # 125947
Total Questions Posted # 479
Total Answers Posted # 668

Total Answers Posted for My Questions # 836
Total Views for My Questions # 366764

Users Marked my Answers as Correct # 0
Users Marked my Answers as Wrong # 0
Answers / { nashi informatics solutions }

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

Question { 858 }

What is the purpose of #pragma directives in C?


Answer

#pragma provides compiler-specific instructions.
Example:
#pragma pack(1) // Forces 1-byte alignment for structures
struct Example {
char a;
int b;
};

Is This Answer Correct ?    0 Yes 0 No

Question { 839 }

How does memset() work in C?


Answer

memset() initializes memory to a specific value.

Is This Answer Correct ?    0 Yes 0 No

Question { 892 }

What is the difference between exit() and _exit()?


Answer

• exit(): Cleans up resources (e.g., flushes buffers).
• _exit(): Terminates the program immediately without cleanup.

Is This Answer Correct ?    0 Yes 0 No

Question { 814 }

What are dynamically linked and statically linked libraries?


Answer

• Static linking: Combines library code into the final executable.
• Dynamic linking: Links libraries at runtime.
v

Is This Answer Correct ?    0 Yes 0 No

Question { 1004 }

How does the assert() function work?


Answer

How does the assert() function work?

Is This Answer Correct ?    0 Yes 0 No

Question { 931 }

What is the purpose of the fflush() function in C?


Answer

fflush() clears the output/input buffer.

Is This Answer Correct ?    0 Yes 0 No

Question { 943 }

What is the difference between fork() and vfork()?


Answer

• fork(): Creates a child process with a separate memory space.
• vfork(): Shares the memory space with the parent until exec() or _exit() is called.

Is This Answer Correct ?    0 Yes 0 No

Prev    1   ... 4   ... 7   ... 10   ... 13   ... 16   ... 19   ... 22   ... 25   ... 28   ... 31   ... 34    36   [37]    38  ... 40   ... 43    Next