Search the web
Sign In
New User? Sign Up
Programmers-Town
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 243 - 272 of 12634   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
243
Can anyone expln the below code main() { union bbb { struct { int a:1; int b:1; int c:1; int d:1; int e:1; int f:1; int g:1; int h:1; }aaa; char x; }; union...
suganthi rams
win_truth
Offline Send Email
Sep 1, 2003
10:52 am
244
The structure members are bit fields. Each member is having 1 bit assigned to it. And all bits have value 1 which means in all the 8 bits value 1 is stored. SO...
haque_nasir
Offline
Sep 1, 2003
6:56 pm
245
hi , it will store 1111 1111 which is -1 as negative nos are stored in 2 s compliment form . suganthi rams <ashvinistar@...> wrote: Can anyone expln...
Girish Johari
girish_johar...
Offline Send Email
Sep 1, 2003
6:58 pm
246
Hello All Are there any good C++ FAQ url's, like the ones that we have http://www.eskimo.com/~scs/C-faq/top.html Yes.Googled.Best that i found was...
kitta techi
kitta_techi
Offline Send Email
Sep 2, 2003
9:05 am
247
i found this to be interesting http://www.parashift.com/c++-faq-lite/ ... __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free,...
zimbabaoCEO
zimbabao
Online Now Send Email
Sep 2, 2003
5:37 pm
248
Hi, The compiler looks only for the declaration but the linker looks for the definition. When u r compiling the code it checks the function is declared or...
Manikandan Meyyappan
hi_manikandan
Offline Send Email
Sep 3, 2003
5:04 pm
249
hai i am unable to understand the unspecified behaviour of the statement a[i] = i++ int the followinf program segment int main() { int a[10],i; for (i = 0;i <...
nancy_ind_tn
Offline Send Email
Sep 5, 2003
4:23 pm
250
hai i am unable to understand the following code. can anyone kindly explain me. int main() { int a[10], i; for (i =0;i<10;i++) a[i]=i++ } with regards ...
nancy india
nancy_ind_tn
Offline Send Email
Sep 5, 2003
4:24 pm
251
If you think the statement is confusing because you cannot be sure which element the array is modifying, so is the compiler. See: <...
Shyan Lam
sflam108
Offline Send Email
Sep 5, 2003
8:47 pm
252
Hi 1 st iteration: i =0; a[0] = 0; then i is incremented to 1, so the value of i, after assigning a[0] to 0 is 1(note this) now 'i' is again incremented,...
venkata_subramani@...
venkatasubra...
Offline Send Email
Sep 5, 2003
8:47 pm
253
You can analysis this way, but there is another possibility (actually possibilities)... We know that i++ returns the original value of 'i' and increment 'i' by...
Shyan Lam
sflam108
Offline Send Email
Sep 6, 2003
11:27 am
254
hi one n all I went to an interview n I found this program as very very intersting but could not able to solve. so here is the program Reverse a string in a...
preeti siddappa
ammu_preeti
Offline Send Email
Sep 8, 2003
4:21 pm
255
... /* reverse string in a buffer str: string buffer len: length of the string */ void revstr(char *str, int len) { int i; char a; for(i=0; i < len/2; i++) { a...
Shantanu Kumar
shantanu_k06
Offline Send Email
Sep 8, 2003
5:06 pm
256
Lets make the problem more interesting......... what if u can traverse the string only once......... finding length needs one traversal. Manish....
Manish Shroff
manish_shroffin
Offline Send Email
Sep 9, 2003
1:45 pm
257
... Hmm...this is one I came up with, but it's horribly inefficient: /* reverse string in just one pass using no buffer note: very inefficient (rather stupid) ...
Shantanu Kumar
shantanu_k06
Offline Send Email
Sep 9, 2003
3:18 pm
258
This is not a single traversal in the true sense. Infact for every "i" u r traversing the rest of the string. I thought of one efficient solution but not many...
Manish Shroff
manish_shroffin
Offline Send Email
Sep 10, 2003
8:33 am
259
Hi Manish, Push the complete string means n charachters and pop the complete strings which needs again n pop s? Then shudn't we say two traversals, Good...
Sudhanshu Saxena
sudhanshu_sa...
Offline Send Email
Sep 10, 2003
7:15 pm
260
hi manish, But in this solution when u r pushing into stack means u r using one more buffer(stack) to store, but the question raised is we should not use...
Manikandan Meyyappan
hi_manikandan
Offline Send Email
Sep 10, 2003
7:15 pm
261
... The idea of using a stack hit me before but I had to laugh it off. Not that it was only outrageously inefficient as well but it would also violate the ...
Shantanu Kumar
shantanu_k06
Offline Send Email
Sep 10, 2003
7:15 pm
262
Does using recursive function consider external buffer? #include <conio.h> void ReversePrint(const char *Text) { if (*Text) { ReversePrint(Text+1); ...
Shyan Lam
sflam108
Offline Send Email
Sep 11, 2003
4:36 pm
263
Oops, putch() is non-standard, use putchar() or printf() with %c instead. Both required <stdio.h>. Sorry. Shyan...
Shyan Lam
sflam108
Offline Send Email
Sep 11, 2003
4:36 pm
264
hi.. i think using a stack is still use of another buffer (or string).. puneet This is not a single traversal in the true sense. ... ...
Puneet Gupta
puneetg123
Offline Send Email
Sep 11, 2003
4:36 pm
265
some one had replied with one correct solution to this problem /* program not tested */ void reverse_string(char* string) { int n = strlen(string); int i=0; ...
zimbabaoCEO
zimbabao
Online Now Send Email
Sep 11, 2003
4:36 pm
266
Yes u ppl r rt....... No doubt in some sense it means two traversal............. The other way of using the same idea is to use recursive fn calls (implicit...
Manish Shroff
manish_shroffin
Offline Send Email
Sep 11, 2003
4:36 pm
267
strlen() does traversing the string internally, so this is kind of cheated. Shyan...
Shyan Lam
sflam108
Offline Send Email
Sep 11, 2003
5:25 pm
268
hi yah strlen internally traverses the string but i consider this as a internal implemantataion detail of C and in general this solution is ok if we have the ...
zimbabaoCEO
zimbabao
Online Now Send Email
Sep 12, 2003
7:03 am
269
Calling strlen means one traversal. Looping means second traversal. Manish...
Manish Shroff
manish_shroffin
Offline Send Email
Sep 12, 2003
7:03 am
270
Nice & Clean.Good Implicitly using push and pop on stack. I hope this must be acceptable. ... From: Shyan Lam [mailto:lam@...] Sent: Thursday,...
Sudhanshu Saxena
sudhanshu_sa...
Offline Send Email
Sep 12, 2003
7:03 am
271
Hi, strlen is one loop this is O(n) but looping twice strlen loops through searching for '\0' I don't think this shud be accepted as correct, what say ppl? ...
Sudhanshu Saxena
sudhanshu_sa...
Offline Send Email
Sep 12, 2003
7:03 am
272
IMHO, if strlen() is okay, it wouldn't be that much of a challenge after all. Anyway, we'll let the OP make the call :-) Shyan...
Shyan Lam
sflam108
Offline Send Email
Sep 12, 2003
6:22 pm
Messages 243 - 272 of 12634   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help