comp.lang.c
http://groups-beta.google.com/group/comp.lang.c

Today's most active topics:

* C to Java Byte Code - 115 new
  http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/88cb533585cafed4

* Commenting the source code. - 27 new
  http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/f8fb8ea8330fb9ef

* derangement: code review request - 27 new
  http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/63c5271ccb9149a

* Strings in C source code - 23 new
  http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/5a77bf67f0cf4248

* Array initalization doubt. - 18 new
  http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a0350b86ca5dc3b3

 
Active Topics
=============

Dynamic analysis tools information - 2 new
----------------------------------
Dear reader, Are there any widely used dynamic analysis tools which are used
for detecting errors in programming, for example null dereferences, deadlocks,
etc.. Some of the tools which I could know are Daikon, *J, MAc JAVA, Delta 
Debuggers. Infact all these tools provide runtime information. Are there any 
tools like Purify (in C for memory based errors, array out of bounds etc). 
Can any one give information regarding the runtime analysis tools for error 
detection in C++ and JAVA. Thanks, Vipin ... -   Mon,  Oct 25 2004 2:38 am
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/169f3aea21f3187d

limits reached - all new
----------------------------------
... Yeah the problem was from GLAT (No 17). I tried and could devise the brute
force method of solving and it did. It was a practise for me in C programming 
as well. fflush(stdout) was the culprit, which did not print the number 199981!
 ... But got interested in the other aspects like time taken inside the loop 
which covers till ULLONG_MAX. Nope, I am not thinking of submitting to GLAT, 
just enjoying it. Thanks! Senthil ... -   Mon,  Oct 25 2004 3:08 am
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/7e99c70fa90d4208

Pointer Guide Nearing Completion - 10 new
----------------------------------
... I know what computers expect from their operators. Here we are talking 
more about general abstract thinking than programming as such...the difference
between 'points at nothing' and 'does not point at anything' probably will not
be discerned by computers for /some time/. For our purposes, they are 
virtually the same, as neither & nor a successful call to malloc will ever 
return NULL. ...... -   Mon,  Oct 25 2004 3:27 am
10 messages, 7 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3aeeb768080be25b

Array initalization doubt. - 18 new
----------------------------------
Hi all, Consider this line - char s[30] = "\0"; Does this initialize all 
array elements to zero ? Thanks. ... -   Mon,  Oct 25 2004 3:37 am
18 messages, 11 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a0350b86ca5dc3b3

Commenting the source code. - 27 new
----------------------------------
... If you have a 500 line function the code is almost certainly already 
beyond hope. The exception is probably a switch statement. ... -   Mon,  
Oct 25 2004 3:47 am
27 messages, 14 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/f8fb8ea8330fb9ef

derangement: code review request - 27 new
----------------------------------
... Young Maidens Manipulate Violet. ... -   Mon,  Oct 25 2004 3:47 am
27 messages, 6 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/63c5271ccb9149a

C to Java Byte Code - 115 new
----------------------------------
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... ...
 As I understand it, this issue only affects incompetent programmers who 
write code that assumes that bytes have eight bits. The sort of programmers 
in whose code unions are "ubiquitous". - Gerry Quinn ... -   Mon,  Oct 25 
2004 3:48 am
115 messages, 28 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/88cb533585cafed4

SELL this FBI NOC LIST and MAKE MILLIONS like TOM CRUISE did in MISSION 
IMPOSSIBLE - 4 new
----------------------------------
If you have ENTREPRENEURIAL BENT OF MIND, then SKY IS THE LIMIT, you can SELL 
this FBI agents' NOC LIST and MAKE MILLIONS of dollars like Tom Cruise (Ethan)
did in the movie MISSION IMPOSSIBLE. Remember, NOBODY has to FOLLOW THE RULES
since the SADISTIC FBI DID NOT FOLLOW THE RULES If your IQ is LESS THAN 100, 
you are kindly requested to ignore the rest of this column and move on to the 
next post in the news group. Please SAVE this post on your hard disks or 
email account and also bookmark it because the FBI SADISTS and... -   Mon,  
Oct 25 2004 4:51 am
4 messages, 4 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/d9efc5258e93d9dc

GetByte(int x, int n) - 4 new
----------------------------------
... You have just discovered an inconsistency in the C standard. Note that 
the standard's own example of implementation-defined behaviour actually refers
to an implementation-defined value. You won't find the exact wording of the 
example anywhere else in the standard. Dan... -   Mon,  Oct 25 2004 5:04 am
4 messages, 4 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c5aa5da0d5dfa7f0

vulnerabilities - 9 new
----------------------------------
... You're ignoring the obvious explanation: his disregard for *any* standard.
void main works on his compiler and this is good enough for him. Dan... -   
Mon,  Oct 25 2004 5:17 am
9 messages, 5 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/5f5c39262f0a735e

Stream Redirection. Newbies question - 3 new
----------------------------------
Hi. I work in Debian Linux GCC. I have a function, which opens a socket and 
binds 'mystream' stream with this socket (by fdopen command). Then, while 
being inside this function I want stdout be redirected to mystream. On exiting
the function I have to return stdout to ordinary stdout. I did it like this: 
Entering function { .. FILE* sos_stdout; sos_stdout = stdout; //reserving 
stdout stdout = mystream; //redirecting ... doing something ... stdout = sos_
stdout; //returning stdout back fclose(mystream); //closing my stream...
-   Mon,  Oct 25 2004 6:06 am
3 messages, 3 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/440a4b6c34810a1d

What's wrong in my function of reverse the doubly linked list with dummy node.
- 4 new
----------------------------------
... You swap one node too few. Change the while loop to a do-while loop so 
that the end condition is at the end of the loop. Nick. ... -   Mon,  Oct 
25 2004 6:09 am
4 messages, 4 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/744446bcea4dc324

Problem reading struct in a file - 2 new
----------------------------------
I get some errors while compiling... First, the line "BOOK book;" give some 
Undeclared identifier error. Is it because I can't declare a new instance of a
struct directly in a function ? The other error I get is with the line 
"books[num_books] = book;" and the error is "cannot convert from int to 
bookInfo". I don't know why I got this error because we assign the values of 
book to the books with the num_books value... Thanks ... -   Mon,  Oct 25 
2004 6:15 am
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/93a6e481816e56dc

Access from function in struct (pointer to function) to other items in the 
struct (advanced) - 2 new
----------------------------------
... Yes. I know that the variable argument list can only be defined, when at 
least one memory address of a given argument is available. With (...) i meant,
that the arguments are not essential for this problem. ... By the way, is 
int ( * delegate ) ( int x, ... ); still a variable? I would say it is, since
pointers are only variables that can hold memory a address. ... But that's 
not an error. It defines a variable that can hold a memory address to a char 
and a variable that holds a char. I don't exactly know the... -   Mon,  Oct 
25 2004 6:21 am
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/f1f14e8f44f52965

Undefined behavior? - all new
----------------------------------
... Well, imprimis, it seems your baseball hooligans are quite capable of 
causing unpleasant riots themselves, and secundis I wasn't really talking 
about the idiots who call themselves fans but do nothing but cause aggro, but 
about the _real_ fans. I've never seen any of those post to usenet with a club
.sig (though they probably do in sports groups), but recently I've spotted 
several Sox fans who can't control their excitement even in completely 
unrelated groups. Now, I can understand _why_ they're excited.... -   Mon,  
Oct 25 2004 7:14 am
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/8f55addc267dddd3

K&R2 2.3 : /n vs /r - all new
----------------------------------
... So you say. Perhaps you'll one day have to deal with a text file which 
uses the character 'ÿ', and you'll scratch your head wondering what on earth 
could have caused your program to terminate prematurely... ... It is, after 
all, a very simple correction. It's doubly useful, btw: if you ever find 
yourself using , passing a negative character value, _any_ negative character 
value except the one that happens to be equal to EOF, causes undefined 
behaviour (and that one exception doesn't behave as expected). Passing the 
original int... -   Mon,  Oct 25 2004 7:14 am
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a1db79165370e7e9

hi i am a girl who were trying a bit on C can someone help? - 15 new
----------------------------------
here is the 1st program that I've made in which it will ask for you to key in 
a user ID if found it will modify the existing record of the ID you've entered
and if not found it will call add_record function where you can create a new 
record but since the last 2 days , it continue to fail can someone pls help me
out thanks in advance the code are : /*Function 1a*/ void modify_record(){ 
char Name[50]; int Target, ID, selection, Found=0; FILE *rec, *temp; temp=
fopen("temp.txt", "w+"); if((rec=fopen("record.txt", "r+")) == NULL)... -   
Mon,  Oct 25 2004 8:25 am
15 messages, 7 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/9c80ccfd4eb5c4c8

Interesting coding idea - 9 new
----------------------------------
[comp.lang.python trimmed from crosspost list] In article <2tvup4F24iddjU1@
uni-berlin.de>, ... I'm reading this in comp.programming, but for the comp.
lang.c readers, here's a not entirely off-topic idea: Why not build a 
DeathStation simulator? Create a VM that allows aggressive testing for bad (
especially not- well-defined) code, and a compiler targeting it that optimizes
for checkability rather than performance or size. Obviously you'd need 
pointers to be more than just a memory address (segment/offset/size would work,
 with pointer... -   Mon,  Oct 25 2004 9:32 am
9 messages, 4 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e611d0a5242f22c0

cancel of <[EMAIL PROTECTED]> - all new
----------------------------------
cancel by original author ... -   Mon,  Oct 25 2004 12:03 pm
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/9eb198e8c2a0026

Keeping a file in memory - 3 new
----------------------------------
Hi, I'm using a third-party library which writes some useful information into
a file. In order to do so, I just have to pass a file name to a library 
function and the file gets written. The problem is that I need the 
information that has been written to the file immediately. I other words, the 
library writes the info to a file (on disk) and my code reads this file 
immediately afterwards, which makes writing the data on the disk a waste of 
time. I was wondering if there is a (ideally standardized and portable)... - 
 Mon,  Oct 25 2004 1:40 pm
3 messages, 3 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/f2c5f8ff6df56245

Safer and Better C - 3 new
----------------------------------
... Actually what I mean is things like "this integer parameter cannot be 
negative" or "this pointer cannot be NULL" or "this integer parameter must 
correspond to a lower bound for the space available for a given buffer 
parameter" etc. Those are ok for module-internal statically declared 
functions. But for stuff you expose via extern, you should just accept any 
combination of whatever parameters so long as they are legal with respect to 
their type (for example pointers should either point to something valid or be 
NULL -- not... -   Mon,  Oct 25 2004 4:00 pm
3 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/8313ab0630871577

Clearly, it is too late to fix c99 - C is dead - 2 new
----------------------------------
... http://sourceforge.net/softwaremap/trove_list.php?form_cat=160 http://www.
tiobe.com/tpci.htm While neither is really "hard" data, they are at least 
independent measures that show nearly the same thing. It shows C, C++ and 
Java to be all neck and neck. Not sure why you are seeing any appreciable 
amount of Fortran, but I'll take these figures over anecdotal claims about 
what you have seen or not. -- Paul Hsieh http://www.pobox.com/~qed/ http://
bstring.sf.net/ ... -   Mon,  Oct 25 2004 4:34 pm
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/2294ba70f0949aae

Some Interview Questions - 16 new
----------------------------------
I had these questions in an interview today: 1. Define a class using C. 2. 
Write a C functions that does garbage collection: frees all allocated memories.
 3. Define semaphore. 4. What is parallel programming and what kind of 
problems you will face in this kind of programmings? I will appriciate if 
someone gives some answers to the first and the second questions. Regards, 
Matt ... -   Mon,  Oct 25 2004 4:43 pm
16 messages, 12 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e352a550394ff15d

Pointers to structure and array of structure. - 2 new
----------------------------------
void main() { int i; int *x, *y; x = (int *) calloc(10, sizeof(int)); for(
i=0;i<10;i++) ... in the above program I want to to access x by pointer 
notation instead of array notation i.e. instead of using x[i] = i; I use *(
x + i) = i; it doesn't work. secondly I use *x = i; x++; work fine but then 
I lost the pointer to first element i.e. x[0]. I am giving this example using
simple int but I really need to access a structure with pointer notation. 
which give me segmentation faults or other values. /********** Guys like "
ARTIE GOLD" should... -   Mon,  Oct 25 2004 10:14 pm
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/26e7369611d6c5e0

Function that standardize a string with lowercase and uppercase ? - 2 new
----------------------------------
Hi all, I need to make a function that convert a string into a certain format.
Here what are the restriction: -The first letter of the first and last name 
must be uppercase. -If a first name contains only 1 character, a '.' must 
follow the char. -If we find a character that isn't a letter (.&*-), we must 
swap it for a '/' and add the correct spaces. I tried making a function but
my switch seems to have an error. If anyone could help me out or give me a 
better way, that would be very appreciated ! Right now I'm reading each letter
of a name... -   Mon,  Oct 25 2004 11:03 pm
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/d03451b6643baa68

memory use - 13 new
----------------------------------
In the below example, I beleive that the char array buffer[40] should only 
occupy 40 bytes of the stack within the inner braces. However the compiler 
seems to use 40 bytes of the stack througout the entire function that this 
example is cut from. Is this normal? if(midnightflag==1) { lcd_clear(); 
lcd_locate(1,1); lcd_display("Updating date"); { unsigned char buffer[40];
 daydateyear(buffer); senduart2(buffer); senduart2("\
r\n"); ... midnightflag=0; ...... -   Mon,  Oct 25 2004 11:34 pm
13 messages, 9 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/5cf3fc0970b56783

Inconsistent time zone - 2 new
----------------------------------
... I managed to resolve this by unchecking the Automatically adjust option 
checkbox in Date and Time properties (on the machine returning GMT Standard 
Time), then clicking OK to close the dialog box, then going back into the 
dialog box and rechecking the checkbox and clicking OK again. Strftime("%Z") 
on that machine now returns GMT Daylight Time. The strange thing is that 
strftime() on the other machine (this machine, in fact) returns BST. There 
are other puzzling things... This machine returns BST even though it ... -   
Tues,  Oct 26 2004 1:13 am
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e58dc4643ce07c99

fopen failed when called several time. - 4 new
----------------------------------
Hi, I would to call fopen function several time in my application. This 
application permits to read files which path is registered in a configuration 
file. For exemple: File 1 = toto.txt File 2 = tot2.txt ...File N = TotoN.txt 
Then, I read each file (one by one), get adress of the beginning of data and 
size of data. I use, this function: static bool OpenFile(char* aSrcPath, uint8*
* aBuffer, uint32* aBufferSize) { FILE* theInputFile = 0; uint8* theBuffer =
0; uint32 theBufferSize = 0; uint32 theSizeRead = 0; /********************/
... -   Tues,  Oct 26 2004 2:49 am
4 messages, 3 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/cfc09c7e5808beea

Array scope - 6 new
----------------------------------
Consider this lines of code: *int make_array(); void get_array(int *array_
pointer); *int make_array() { int i; array[20]; for(i=0,i<=19,i++) { 
array[i]=i; ... void get_array(int *array_pointer) { for(i=0,i<=19,i++) { 
printf("%d",*array_pointer); array_pointer++; ... get_array(make_array());
I made this code in order to make my question. Does the last line of code make
sence? Does the array exists when make array has ended? When i run such code i
don't have a problem. Am i lucky that the items are still there and... -   
Tues,  Oct 26 2004 2:53 am
6 messages, 6 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/e75d9528f8f179c1

fftw-3.0.1-fma + Lynxos+PPC G4 fails tests. - 4 new
----------------------------------
Hi, all, ... configure script to use the -fvec instead of -faltivec and use 
the our-malloc16 function. I never could run the checks in tests directory, 
since they always failed with signal 11. Here follow the core dump and an 
excerpt from the config.log: core: ... Interrupt) @ d9010 (data/bss/heap) 
link register t_shift+0x2bc Called from t_shift+0x24c Called from verify_r2r+
0x3f4 Called from verify+0xc8 Called from bench_main+0x244 Called from 
aligned_main+0x10 Called from main+0x10 Called from _start+0x6c... -   Tues,
  Oct 26 2004 3:13 am
4 messages, 3 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a1b69c4a5906d0c1

qsort + structure problem - 6 new
----------------------------------
Suppose I have a struct typdef struct foo { int age; char *name; ... now I 
made a list of foo using foo **li; li = (foo **)calloc(size,sizeof(foo*)); 
then i add some element in foo like foo * elem; elem = (foo*)malloc(sizeof(
foo)); elem->age = some int; elem->name = some char* allocated by malloc *(
li + i) = elem; // put elem at li[i] ok my list is created and look good. now
here is the question: I try qsort to sort list by age and and name; for age I
use qsort(*li,count,sizeof(foo *),mycmp); void mycmp(const void *p1,const 
void p2)... -   Tues,  Oct 26 2004 3:25 am
6 messages, 5 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/fcdf62618dc133be

Here is my full program excluding the search and delete functions - 3 new
----------------------------------
Thank you for your help I think I know what the problem is. Firstly the add_
record cannot read the record.txt or something if the record.txt (in which I 
used it to store the details of each record) is present in the same directory.
When it prompt enter your selection from the menu, it will just stuck there 
so I cant even create a new entry and thus I cant check the modify function in
my program. If it's not present, it will create a record.txt once I've add 
everything in it when I view in the record.txt file, these shows up ... -   
Tues,  Oct 26 2004 4:29 am
3 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/2096b9852d46b410

Allocating an array of char* - newbie - 3 new
----------------------------------
Hello, I wrote thsi small program ; I am quite a newbie in this. ... typedef
struct argsArray { char* ip_addresses[]; int no_of_addresses; ... int 
main() { argsArray* argsArrayPtr = (argsArray*)malloc(sizeof (argsArray)); 
argsArrayPtr->no_of_addresses = 3; argsArrayPtr->ip_addresses[0]="10.0.0.0"; 
argsArrayPtr->ip_addresses[1]="10.0.0.1"; printf("no_of_addresses %d\n",
argsArrayPtr->no_of_addresses); printf("argsArrayPtr->ip_addresses[0] = %s\
n",argsArrayPtr->ip_addresses[0]); printf("argsArrayPtr->ip_addresses[1] =...
-   Tues,  Oct 26 2004 5:45 am
3 messages, 3 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/2ea81e28c64be263

How to generate all possible permutations with repetitions? - 5 new
----------------------------------
Hello, I need help with an algoritm that given a set of "n" distinct 
numbers will generate all the possible permutations of fixed length "m" of 
these numbers WITH repetitions (a total of n^m possibilities). For example: 
given the set {1, 2} would output: 111,112,121,122,211,212,221,222 if we fix m=
3. What I could do so far is an iterative algorithm which could be used only 
if we know before runnin the program "m" and "n" which is not often the case :)
 int n=2; //stores the numebr of elements in the set int m=3; //stores the 
length of the desired... -   Tues,  Oct 26 2004 5:51 am
5 messages, 4 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a902c6f94b8f42f5

URGENT: pls help, Need to know how to set Environment in Visual .NET (using C)
- 2 new
----------------------------------
Hey all: I need urgent information how to set the environment in Visual.NET 
wiritng in C. I am working with a licensed version of the Analyze 6.0 
software from mayo clinic. I need to write code in C using AVW functions that 
are licensed by Mayo clinic. In order to access the AVW library of functions,
I need to set the environment to look at the license file through my C code. 
The syntax to set the environment is something like: set "variable" = "path". 
I tried doing this but it gave me a lot of errors. Could someone please offer
me a soln. ... -   Tues,  Oct 26 2004 9:42 am
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/204b1abba46731ab

Can a double always represent an int exactly? - all new
----------------------------------
... Thanks for that. It's useful to know. Fred ... -   Tues,  Oct 26 2004
11:20 am
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/c95ebe8b3d2253a

Code for substring & int conversion - 4 new
----------------------------------
I have written the following code to extract the last 3 digits from a string. 
Is there any improvement needed for this code? ... int main() { const char*
nameWithID = "SOME_NAME_261" ; char bufToHold3Digits[4] = {0} ; strncpy(
bufToHold3Digits , nameWithID + strlen( nameWithID ) - 3 , 3 ) ; printf( "%
d", atoi(bufToHold3Digits) ) ; ...... -   Tues,  Oct 26 2004 12:03 pm
4 messages, 4 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/9e8ed0a9ff878be6

Help with newb's project - all new
----------------------------------
... That is a very nice, thoughtful and serious response to my note to Chuck.
I was being a little facetious. I'm sure most of us agree with your 
sentiments above. I do. Often, the poster would offer money for one or any of
us to do the homework. Although we delight in working for money, our clients 
are not usually programming students asking for help cheating on their exams.
 The 'student' poster might attract a bid from someone, "I'll do it for $100"
for example. The poster sees the 'bite' and assumes ... -   Tues,  Oct 26 
2004 7:13 pm
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/ad0d79201461916e

strange problem with optimisation - 2 new
----------------------------------
G'day I have encountered quite a strange problem with a new function i've 
added to an existing software. Pseudo code of actions. -- begins -- func_
foo (){ /* already in software */ while (packet) { /* call to my 
function */ func_bar(); ... /* my function */ void func_bar () { /*some 
static variables*/ /*and declaring an instance of a structure (defined 
previously containing 3 double) */ roundTripTime rtt; /*rtt being 
initialised*/ init_rtt(&rtt); /* function that does the processing, 
internally calls many other... -   Tues,  Oct 26 2004 7:09 pm
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/1262e464f267b8e3

couple of questions on streams - 5 new
----------------------------------
7.19.3p7 "At program startup, three text streams are predefined and need not 
be opened explicitly — standard input (for reading conventional input), 
standard output (for writing conventional output), and standard error (for 
writing diagnostic output). As initially opened, the standard error stream is
not fully buffered; the standard input and standard output streams are fully 
buffered if and only if the stream can be determined not to refer to an 
interactive device." What is fully buffered? I was looking at some... -   
Tues,  Oct 26 2004 11:24 pm
5 messages, 5 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/999c750f9c648b21

Why will this not generate a random number!? - 13 new
----------------------------------
This has been driving me crazy. I've done basic C in school, but my education 
is mainly based on object oriented design theory where Java is our tool. For 
some reason, while helping a friend with a C Programming lab. I cannot for the
life of me generate a random number. i don't know what is wrong. please help. .
.. int main(void) { float b; b = ((float)rand()/RAND_MAX); printf(
"Random Number: %f", b); system("PAUSE"); return 0; ...... -   Tues, 
Oct 26 2004 11:37 pm
13 messages, 11 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/2fc74627d42f41a

Strings in C source code - 23 new
----------------------------------
Hello, Is it legal to have a non-quote terminated string in C? For example: 
printf("Hello World ... instead of what I normally use printf("Hello World
" ... I had believed not, but some compilers seem to allow this. Just want to 
be sure if this is a problem with my Compiler, or if it really is allowed. <
ot> does anyone know of compilers that allow this? </ot> Thanks Jason. ... - 
 Tues,  Oct 26 2004 9:44 am
23 messages, 14 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/5a77bf67f0cf4248

Can Array Work within Structure? - 2 new
----------------------------------
hi I wonder if array can be work along with structure? Below are the 
declaration of my structure struct employee{ char ID[15]; char Name[20]; 
char Department[5][30]; int selection; char Post[3][30]; ... I was wondering
could if there is anywhere you can : struct employee{ char ID[15]; char Name[
20]; char Department[5][30]={"Accounting","Administration","Management","Human
resource","Others"}; int selection; char Post[3][30]; ... because the 
problem is when I wanted to store this data , below is the declaration of 
arrays within the add_record... -   Wed,  Oct 27 2004 3:41 am
2 messages, 2 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/3f2dc12fd8e2eb6b

Sort 1-D of a 2-D array and copy both - 4 new
----------------------------------
Hello all, I am newbie trying to sort as follows : Before: int a[9][2] = {0,
5, ... After Sorting: ... I want to sort a[][1] in in ascending order and 
copy both a[][0] and a[][1]. Please help me. ~regards, Dilip ... -   Wed,  
Oct 27 2004 5:41 am
4 messages, 4 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/157f4ef92c29a0d9

[OT]Re: C to Java Byte Code - 11 new
----------------------------------
... <snipped> I think that you have lost the plot here. The consensus here (
CLC) seems to be that if the product under discussion is able to read the 
posted code (upthread) and produce java bytecode that works as expected (
including the UB), then there is, in fact, a great possibility of the product 
working as advertised. You seem to be having difficulty imagining java 
bytecode that could possibly implement a union (nevermind how many hoops it 
has to jump through); I suspect that its merely very difficult and/or... -   
Wed,  Oct 27 2004 7:14 am
11 messages, 7 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/f0fc6e7be97f176

What is multithread safety - 15 new
----------------------------------
Hi, I was trying to find out what exactly is meant by multi-thread safe code/
functions etc. I couldn't find relevant information on the web and would 
appreciate any useful links/information on this topic. Thanks. Sincerely, 
Shalini. ... -   Wed,  Oct 27 2004 7:22 am
15 messages, 10 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/a349b9ed0d65f0d3

Off Topic: Why is stdprn not defined under Windows? - all new
----------------------------------
... I tend to weigh Douglas A. Gwyn's opinions heavily. My understanding was 
that he disagreed with me. I am comfortable not knowing what a file is. I may
have misconstrued this as well, but I also learned that you don't have to know
what a file is, to know C. If you were to ask me what "associate" means, as 
in "associate with a stream", I would have to say that I don't exactly know, 
but that didn't stop me from using that word in this thread a few times, 
where I genuinely intended it to mean whatever it really means.... -   Wed,  
Oct 27 2004 1:53 pm
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/40b707dad6259a20

resolving a warning error - all new
----------------------------------
I would like to code a prototype that returns an enum, but not declare the 
enum. This works on several systems and compilers, but fails on aix xlc. 
Here is the sample code: enum anEnum someFunc(void); when i run: xlc -c 
someFunc.c i get 1506-103 (W) Tag anEnum requires a complete definition before
it is used. Obviously, I could declare the enum, but I would like to avoid 
declaring the enum as I would like to hide the values of the enum from 
functions that don't need it. I use a similar technique to hide the members...
 -   Wed,  Oct 27 2004 4:30 pm
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/51163699c4d6ba84

Why can't constants have commas? - 4 new
----------------------------------
My code obfuscator gave me this: char buff[1, 9]; to which gcc retorted: "
ISO C90 forbids variable-size array 'buff'" and checking the standard, it 
appears that commas are indeed forbidden from being in a constant expression.
Why's that? Wouldn't it make more sense to allow commas as long as the left 
and right operands are also constant expressions? Calling the expression 1,9
"variable-size" is pretty silly. -Peter ... -   Wed,  Oct 27 2004 4:55 pm
4 messages, 4 authors
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/63c83bd31dbb075d

Is this legal ? - all new
----------------------------------
Hi group, In C++ it's undefined behavior if one tries to un-const the 
constness of a const variable with const_cast<>. I want to know if the same 
holds good in C too. E.g. const char *s = "abc"; Later, is trying to do (char
*) s legal ? Thanks. ... -   Thurs,  Oct 28 2004 12:08 am
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/dbe05ac54921bc92

Is this legal stuff as per C Standard? - all new
----------------------------------
Hi group, In C++ it's undefined behavior if one tries to un-const the 
constness of a const variable with const_cast<>. I want to know if the same 
holds good in C too. E.g. const char *s = "abc"; Later, is trying to do (char
*) s legal ? I will appreciate any references to the Standard. Thanks. ... -
  Thurs,  Oct 28 2004 12:34 am
1 message, 1 author
http://groups-beta.google.com/group/comp.lang.c/browse_thread/thread/f7bf0fcaa4144b5a

 

=======================================================================

You received this message because you are subscribed to
the Google Groups "comp.lang.c".  

comp.lang.c

http://groups-beta.google.com/group/comp.lang.c

Change your subscription type & other preferences:
* click http://groups-beta.google.com/group/comp.lang.c/subscribe

Report abuse:
* send email explaining the problem to [EMAIL PROTECTED]

Unsubscribe:
* click http://groups-beta.google.com/group/comp.lang.c/subscribe


=======================================================================
Google Groups: http://groups-beta.google.com   

Reply via email to