The header file is included in all the program. Hope it will compile fine... ... #include <stdio.h> #include <errno.h> #include <string.h> #include <stdlib.h> ...
67762
prakaashganth d
prakaashganth
Sep 1, 2008 10:31 am
Hi People, I have a doubt in C program. Suppose i have declared int i = 1234; If I want to print only 12 (first 2...
67763
andrew clarke
zoomosis
Sep 1, 2008 11:05 am
... You can convert the int to a string with sprintf(), then truncate the string after the first two characters, then display the string. Alternatively, if you...
67764
Thomas Hruska
shininglightpro
Sep 1, 2008 11:20 am
... printf("%i\n", i / 100); Although, if you are wanting a general solution, convert it first to a string, then lop off the first two bytes and display those....
67765
Thomas Hruska
shininglightpro
Sep 1, 2008 11:27 am
... There is no need for subtracting the modulus. It is redundant. Integers are truncated automatically. -- Thomas Hruska CubicleSoft President Ph:...
67766
andrew clarke
zoomosis
Sep 1, 2008 11:34 am
... For some reason I was thinking the division would promote the result to a floating point value. I think this happens in PHP (and possibly Pascal?)....
67767
Rajath N R
rajath_nr
Sep 1, 2008 11:40 am
Hi All, I have 2 idea... 1) main() { int j, i = 1234; for ( j = i; j > 100; j /= 10) ...
67768
Thomas Hruska
shininglightpro
Sep 1, 2008 11:47 am
... Yes, that happens in PHP. However, you can do typecasting in PHP: <?=(1234 / 100)?> 12.34 <?=(int)(45 / 100)?> 12 I'm pretty sure Pascal doesn't promote...
67769
Thomas Hruska
shininglightpro
Sep 1, 2008 11:55 am
... Oops. (Copied and pasted my first example). <?=(int)(1234 / 100)?> ... -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get...
67770
Thomas Hruska
shininglightpro
Sep 1, 2008 11:58 am
... Novel approach. Won't work on multiples of 100. 100, 1000, 10000, etc. for (j = i; j >= 100; j /= 10); Would be more correct. But both are unnecessary....
67771
Thomas Hruska
shininglightpro
Sep 1, 2008 12:04 pm
... I suppose the former is more correct for the general case. The OP really should have been more specific. -- Thomas Hruska CubicleSoft President Ph:...
67772
John Matthews
johnmatthews...
Sep 1, 2008 12:16 pm
... And Delphi? http://www.codegear.com/products/delphi/win32...
67773
John Matthews
johnmatthews...
Sep 1, 2008 12:21 pm
... ...although on the 'Overview39; page they call it 'the Delphi language', and Pascal isn't mentioned at all. On the 'Reasons to Buy' page they call it 'the...
67774
John Matthews
johnmatthews...
Sep 1, 2008 12:35 pm
... Also, I was sitting next to a (UK) college lecturer on the train the other day, and she said they still teach students Pascal to get them started in...
67775
andrew clarke
zoomosis
Sep 1, 2008 12:50 pm
... I spent about 5 years in the early 90s learning Pascal before I took up C. Old habits, etc. Delphi is fairly heavily based on Borland's "Object Pascal"...
67776
Thomas Hruska
shininglightpro
Sep 1, 2008 12:55 pm
... (InnoSetup is something like Delphi 3-based since later versions apparently bloat the file size or introduce dependencies). I realize a number of popular...
67777
Thomas Hruska
shininglightpro
Sep 1, 2008 1:03 pm
... Actually, that is pretty common. I don't see any particular differences between C and Pascal that would make Pascal "ideal" for learning. Basically, such...
67778
John Matthews
johnmatthews...
Sep 1, 2008 2:59 pm
... Perhaps it's C's tolerance of things like: if (x = y) that offends the 'purists39; :-)...
67779
Sk karthik
catchskk@...
Sep 1, 2008 3:17 pm
Try ipcrm -m $( ipcs -m | cut -d ' ' -f 5 | grep "^[1-9]" ) SK Karthik ... [Non-text portions of this message have been removed]...
67780
subhankar katyayan
subhankar_k@...
Sep 1, 2008 10:12 pm
Thanks for your response, I could able to solve it as follows. Hope it may be helpful to others as well #!/bin/ksh PID=$(ipcs -m |grep "subh" |awk '{print...
67781
mano M
blaunche
Sep 1, 2008 10:12 pm
Hi, I got a strange issue in aix ,when I deal with funtion which retunrs pointer. And same works fine in Linux system. My function looks like as below //...
67782
Rodrigo Bortholin
rbortholin
Sep 1, 2008 10:13 pm
The problem is this: We did a software and it works with: LIB AXIS2C 1.0.0 and AXIOM_SOAP_12 But when we tried to compile it on client´s PC the LIB AXIS2C...
67783
peternilsson42
Sep 2, 2008 3:18 am
... The trouble with pseudo code is it only shows pseudo problems. If you want to know the real answer, post the smallest compilable snippet that exhibits the ...
67784
peternilsson42
Sep 2, 2008 3:40 am
... Sounds more like homework to me. ... The use of implicit int is lazy, as is the lack of include for <stdio.h> which is _required_ for the correct use of...
67785
vipul_lal_100
Sep 2, 2008 5:39 am
Hi All, Anyone know how to determine the CPU register size (32 bits or 64 bits) from within a program? Regards, Vipul...
67786
Paul Herring
shabble
Sep 2, 2008 10:36 am
... You really must stop talking to yourself John... ;) -- PJH http://shabbleland.myminicity.com/...
67787
Paul Herring
shabble
Sep 2, 2008 10:42 am
On Tue, Sep 2, 2008 at 4:21 AM, vipul_lal_100 ... Why would you want to? -- PJH http://shabbleland.myminicity.com/...
67788
John Matthews
johnmatthews...
Sep 2, 2008 12:43 pm
... If there was any other way of getting a sensible conversation, I would :-) John...
67789
Gopi Krishna Komanduri
gopikomanduri
Sep 2, 2008 2:54 pm
Hi Folks, Â Â I have a small query. Upto my knowledge , every process will have 4GB of virtual memory and in that the last 2 GB (I mean from 0x00400000 -...
67790
Jos Timanta Tarigan
jos_t_tarigan
Sep 2, 2008 7:12 pm
Hi, anyone know any openGL discussion group on yahoo or elsewhere? Last time I subscribe to an openGL on yahoogroups, I win tens of lottery every day and no...