i think i should be like this
while((c=fgetc(fp))!=EOF) and not getc
On Thu, Jul 14, 2011 at 2:41 PM, rShetty rajeevr...@gmail.com wrote:
// File Handling
#includestdio.h
#includestdlib.h
int main()
{
unsigned char ch; // I think there is problem somewhere in this
line ! Help !!
FILE
yeah i just figured it out
On Thu, Jul 14, 2011 at 2:47 PM, rajeev bharshetty rajeevr...@gmail.comwrote:
@Aniket Its getc itself !!
On Thu, Jul 14, 2011 at 2:45 PM, Aniket Dutta aniketdutt...@gmail.comwrote:
i think i should be like this
while((c=fgetc(fp))!=EOF) and not getc
On Thu
addtion to previous post while((ch=getc(fp))!=EOF) then 2 case will occur
On Thu, Jul 14, 2011 at 3:16 PM, Aniket Dutta aniketdutt...@gmail.comwrote:
2. the value of EOF is an integer which equals -1 (0x)
and not 0xff becoz this is a valid Ascii character
for this reason
2. the value of EOF is an integer which equals -1 (0x)
and not 0xff becoz this is a valid Ascii character
for this reason of tructation the while loop will always be true.
On Thu, Jul 14, 2011 at 3:13 PM, Aniket Dutta aniketdutt...@gmail.comwrote:
1. in ur program
I've been using Google Talk and thought you might like to try it out.
We can use it to call each other for free over the internet. Here's an
invitation to download Google Talk. Give it a try!
---
Aniket Dutta wants to stay
@sunny: right thanks for correcting
On Wed, Jul 13, 2011 at 11:33 AM, sunny agrawal sunny816.i...@gmail.comwrote:
@Aniket Dutta
Solution for your case will be 96
Algorithm Posted by Oppilas will do and is O(n).
On Wed, Jul 13, 2011 at 11:28 AM, Aniket Dutta aniketdutt...@gmail.comwrote
what happens when to the '{' in comments i guess your program is also
counting that..
On Tue, Jul 12, 2011 at 6:22 PM, nicks crazy.logic.k...@gmail.com wrote:
igonre the previous code, here is fully working code..previous one
doesn't include check for having { within quotes which
for example
/*
{
{
}
}*/
On Tue, Jul 12, 2011 at 6:36 PM, Aniket Dutta aniketdutt...@gmail.comwrote:
what happens when to the '{' in comments i guess your program is also
counting that..
On Tue, Jul 12, 2011 at 6:22 PM, nicks crazy.logic.k...@gmail.com wrote:
igonre
@bittu
On 7/12/11, Aniket Dutta aniketdutt...@gmail.com wrote:
what will happen if node is not found?.
you are not checking it
On 7/12/11, bittu shashank7andr...@gmail.com wrote:
whats the problem with this
bool search(root,node)
{
if(root==node)
return 1;
else
what will happen if node is not found?.
you are not checking it
On 7/12/11, bittu shashank7andr...@gmail.com wrote:
whats the problem with this
bool search(root,node)
{
if(root==node)
return 1;
else
return search(root-left,node)||search(root-right,node);
}
@yeah right
On Tue, Jul 12, 2011 at 7:36 PM, ankit sambyal ankitsamb...@gmail.comwrote:
@Aniket: Just add a condition at the begining:
if(root == NULL)
return 0;
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this
@bittu
On Tue, Jul 12, 2011 at 8:09 PM, Aniket Dutta aniketdutt...@gmail.comwrote:
@yeah right
On Tue, Jul 12, 2011 at 7:36 PM, ankit sambyal ankitsamb...@gmail.comwrote:
@Aniket: Just add a condition at the begining:
if(root == NULL)
return 0;
--
You received this message
sorry @ankit
On Tue, Jul 12, 2011 at 8:10 PM, Aniket Dutta aniketdutt...@gmail.comwrote:
@bittu
On Tue, Jul 12, 2011 at 8:09 PM, Aniket Dutta aniketdutt...@gmail.comwrote:
@yeah right
On Tue, Jul 12, 2011 at 7:36 PM, ankit sambyal ankitsamb...@gmail.comwrote:
@Aniket: Just add
@anika: according to satistics we need both n/2 and n/2+1 to find the
median from an even set
((n/2)+(n/2+1))/2.
but here you cannot do this. so i guess n/2+1 or n/2 both are correct
because both contribute equally to calculate median.
On 7/12/11, bittu shashank7andr...@gmail.com wrote:
now try
@dheeraj: but the prototypes are same. how u are calling it
overloading plz explain
On 7/12/11, dheeraj tyagi dheeraj2...@gmail.com wrote:
const means that it cannot be overloaded..i think due to that this is
happening.
On Tue, Jul 12, 2011 at 9:26 PM, segfault pawan1991ya...@gmail.com
@sandeep sir: thanx sir for clearing doubt
On 7/12/11, Sandeep Jain sandeep6...@gmail.com wrote:
*const* in C++ is not exactly same as *final* in java. SO unlike java adding
the keyword const to a function does not affect overriding.
Infact, adding in C++ const functions == that they will
c=a+b
then find b=c-a;
if this b equals previous one then ok else overflow
On 7/9/11, John Hayes agressiveha...@gmail.com wrote:
regarding question related to overflow
int ovr_sum(int *sum,int a,int b)
{
*sum=a+b
if(*sum0)
return -1; //overflow
else
return 0; //no
you can sort it using external merge sort. if ur file is greater than memory
refer henry F. korth Database System Concept
On Wed, Jul 13, 2011 at 10:26 AM, rShetty rajeevr...@gmail.com wrote:
Given a very big file of words, a word in each line, sort the words .
Please provide the algorithm and
what about a generic swap function which works for structures also?
On Wed, Jul 13, 2011 at 2:23 AM, Don dondod...@gmail.com wrote:
To check for overflow, use condition:
if (b (maxuint-a))
return error;
Where maxuint is the largest value which can be stored in an unsigned
integer.
Don
@vaibhav: Sir ur algo fails in this array {2,-8,-3,1,2} it should give
answer as 24 but ur algo gives 2
On Wed, Jul 13, 2011 at 11:02 AM, varun pahwa varunpahwa2...@gmail.comwrote:
please ignore my previous post that solution is wrong.
On Wed, Jul 13, 2011 at 11:01 AM,
20 matches
Mail list logo