Category : c

Q(Question): whats the beauty of "malloc" over "new" why its helpful for programmer.for its own memory area.?? A(Answer): On 19 Aug, 09:52, Muzammil <muzammilPeer…@gmail.comwrote: whats the beauty of "malloc" over "new" why its helpful for programmer.for *its own memory area.?? malloc() doesn’t get used in C++ programs very much. malloc() just allocates memory. new allocates ..

Read more

Q(Question): Some postings in this newsgroup over the past few months have questioned the popularity of the C programming language. For what it’s worth, the “Reader’s Choice Awards 2008” from _Linux Journal_ shows that C was voted the favorite programming language, slightly ahead of both C++ and Java: http://www.linuxjournal.com/article/10065 My experience on the Linux platform ..

Read more

Q(Question): I am trying to write a utility that takes as argument 1 a file name to write to and as argument 2 takes num as a number of zeros to write a argument 1. A file of zeros. This is how far I have got. Why would I want a file of zeros? To ..

Read more

Q(Question): int main() { int *p; p = (int*)malloc(sizeof(int)); if(p == NULL) { Error("Could not allocate the memory\n"); Error("Quitting….\n"); exit(1); } Is it correct to check in gcc , ( compare with NULL ) A(Answer): In article <65*************@mid.individual.net>, Martin Ambuhl <ma*****@earthlink.netwrote: >pa********@hotmail.com wrote: > int main() { int *p; p = (int*)malloc(sizeof(int)); if(p == NULL) ..

Read more

Q(Question): can anyone help me where to find the best image processing library for c++ mohan gupta A(Answer): On Fri, 21 Mar 2008 02:39:38 -0700, mohangupta13 wrote: can anyone help me where to find the best image processing library for c++ mohan gupta And "best" is stipulated by what requirements? — OU A(Answer): On Fri, ..

Read more

Q(Question): can anybody tell me how to compare two float values say for example t and check are two variables declared float how to compare t and check please help me as soon as possible A(Answer): ne**********@yahoo.co.in wrote: can anybody tell me how to compare two float values say for example t and check are ..

Read more

Q(Question): Do you think we can reach any kind of consensus on whether the following code’s behaviour is undefined by the Standard? int my_array[5]; int const *const pend = *(&my_array + 1); Considering the syntax of the language, then we definitely do dereference an invalid pointer… but if we consider the mechanics of the language, ..

Read more