Re: [algogeeks] increment operator...

2012-11-06 Thread Anil Arya
if (++k  5  k++/5 || ++k = 8);   is same as  if ++k  5) 
(k++/5)) || (++k = 8)));


(++k  5)  (k++/5) in this expression ++k5 returns false(0) ,so there is
no need to evaluate right hand side(why?)
2012/11/6 Anil Sharma anilsharmau...@gmail.com

 main()
  {
   int k = 5;
   if (++k  5  k++/5 || ++k = 8);
   printf(%d , k);
  }

 the output shud be 8 but it comes out to be 7.why???
 as increment operator has higher precedence among them so increment shud
 be done throughout at first and after then other operators shud be
 evaluated.sooutput shud be 8.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Number of arrangements

2012-09-09 Thread Anil Arya
6p3

On Fri, Sep 7, 2012 at 7:36 PM, mohit mishra mohit7mis...@gmail.com wrote:

 I think answer would be 6C3*3!. ie 120.

 On Fri, Sep 7, 2012 at 10:20 AM, Navin Kumar algorithm.i...@gmail.comwrote:

 @tendua: Answer will be 6C3 x 3! .

 For example: If 5 letters are given then you can get only 10 combination
 of different letter = 5C3

 ABC
 ABD
 ABE
 BCD
 BCE
 CDE
 ACD
 ACE
 ADE
 BDE

 now each of these can be arranged in 3! ways. So final answer will be :
 120


 On Fri, Sep 7, 2012 at 1:11 AM, tendua bharat.kra...@gmail.com wrote:


 http://placement.freshersworld.com/placement-papers/Persistent-/Placement-Paper-Whole-Testpaper-1884
 question no. 4 in 5th section


 On Thursday, September 6, 2012 4:40:08 PM UTC+5:30, isandeep wrote:

 Can you send the link to the question.

 On Thu, Sep 6, 2012 at 4:35 PM, tendua bharat...@gmail.com wrote:

 from the six elements, we could choose any three in C(6,3) ways which
 is 20 and then permute all the three elements so it will be multiplied by
 3! which is 6. Hence, 20*6 = 120. We still have to multiply it by 3 to get
 360 but I'm not getting why?


 On Thursday, September 6, 2012 3:54:11 PM UTC+5:30, atul007 wrote:

 seems output should be 20.

 On Thu, Sep 6, 2012 at 3:26 PM, tendua bharat...@gmail.com wrote:

 from the set {a,b,c,d,e,f} find number of arrangements for 3
 alphabets with no data repeated?
 Answer given is 360. but how?

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/**ms**g/algogeeks/-/E4U2XlfkvgMJhttps://groups.google.com/d/msg/algogeeks/-/E4U2XlfkvgMJ
 .
 To post to this group, send email to algo...@googlegroups.com.
 To unsubscribe from this group, send email to algogeeks+...@**
 googlegroups.com**.

 For more options, visit this group at http://groups.google.com/**
 group**/algogeeks?hl=enhttp://groups.google.com/group/algogeeks?hl=en
 .


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit https://groups.google.com/d/*
 *msg/algogeeks/-/VMO1othQRcQJhttps://groups.google.com/d/msg/algogeeks/-/VMO1othQRcQJ
 .

 To post to this group, send email to algo...@googlegroups.com.
 To unsubscribe from this group, send email to algogeeks+...@**
 googlegroups.com.
 For more options, visit this group at http://groups.google.com/**
 group/algogeeks?hl=en http://groups.google.com/group/algogeeks?hl=en
 .


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/z6KbH2i6BP0J.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Snapdeal Paper Pattern

2012-09-05 Thread Anil Arya
Thier aptitudes contain 11 logic puzzles(one can find these on the net)
and 5 algo questions(easy).


On Thu, Sep 6, 2012 at 1:47 AM, noname narayan.shiv...@gmail.com wrote:

 hey i hope your test is over can you also please some info about the test
 was the test online or paper and how many questions from each round..
 how was the interview process what to focus on among DS/OS/OOPS/DBMS..
 please elaborate as much possible...

 On Wednesday, 22 August 2012 23:23:28 UTC+5:30, Arun Kindra wrote:

 Anyone know the paper pattern or ques of snapdeal? And What they
 demand(any specific language)?

 --
 Regards:

 *Arun Kindra*


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/5s90J8zzgBUJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] spoj problem

2012-01-23 Thread Anil Arya
)
 {
 if(visit[j]==visit[i])
 {
 error=1;
 break;
 }
 else if(!visit[j])
 {
 visit[j]=-visit[i];
 addq(j);
 }
 }
 }
 }
 if(error) break;
 }
 printf 
 http://www.opengroup.org/onlinepubs/009695399/functions/printf.html(Scenario
  #%d\n,k);
 if(error)
 printf 
 http://www.opengroup.org/onlinepubs/009695399/functions/printf.html(Suspicious
  bugs found!\n);
 elseprintf 
 http://www.opengroup.org/onlinepubs/009695399/functions/printf.html(No 
 suspicious bugs found!\n);
 }return 0;}


 --
 Dileep Kumar
 3rd year
 Computer Science  Engineering
 NIT, Allahabad

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Binary Index Tree

2012-01-17 Thread Anil Arya
  Questions on  BIT

   http://problemclassifier.appspot.com/index.jsp?search=BITusr=


want questions on segment tree
  http://problemclassifier.appspot.com/index.jsp?search=treeusr=

On Sun, Jan 15, 2012 at 7:58 PM, Amol Sharma amolsharm...@gmail.com wrote:

 also try

 http://www.spoj.pl/problems/DQUERY/

 --


 Amol Sharma
 Third Year Student
 Computer Science and Engineering
 MNNIT Allahabad
  http://gplus.to/amolsharma99 
 http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://www.simplyamol.blogspot.com/
 http://youtube.com/amolsharma99






 On Sun, Jan 15, 2012 at 7:11 PM, saurabh singh saurab...@gmail.comwrote:

 search problem japan
 Saurabh Singh
 B.Tech (Computer Science)
 MNNIT
 blog:geekinessthecoolway.blogspot.com



 On Sun, Jan 15, 2012 at 4:23 AM, Mad Coder imamadco...@gmail.com wrote:

 Hi all, I was going through Binary Index Tree (BIT) tutorial through
 topcoder , although the concept is clear to me, I want to do some more
 practice questions. So it will be helpful if you provide me link of some
 questions of BIT in spoj.

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Strange Billboard of Judge Spoj

2012-01-14 Thread Anil Arya
D floor solution



#includeiostream
#includevector
#includeset
#includemap
#includestdio.h

using namespace std;

char cmp(char s)
{
   if (s=='0')
   return '1';
   else if(s=='1')
   return '0';
}
/* Main code starts from here */
int main()
{
vectorvectorchar  m(16,vectorchar(16));
vectorint arr1(226);
vectorint arr2(226);

int i,j,x,y;
while(1)
{
cinxy;
 if(x==0 y==0)
   return 0;


 for(i=0;iy;i++)
 {
for(j=0;jx;j++)
{
 cinm[i][j];
 }
 }

int k=0 ,flag=0;


 for(i=1;iy;i++)
 {
for(j=0;jx;j++)
{
if(m[i-1][j]=='0')
{
m[i][j]=cmp(m[i][j]);
if((i-1)=0)
m[i-1][j]=cmp(m[i-1][j]);

if((j+1)=x)
m[i][j+1]=cmp(m[i][j+1]);

if((i+1)=y)
m[i+1][j]=cmp(m[i+1][j]);
if((j-1)=0)
m[i][j-1]=cmp(m[i][j-1]);

k++;
arr1[k]=i+1;
arr2[k]=j+1;

 }
 }
 }

 for(i=1;iy;i++)
 {
for(j=0;jx;j++)
{
if(m[i][j]=='0')
flag=1;
}
}


  if(flag==1)
 cout-1endl;
  else
  {


coutkendl;
 for(i=1;i=k;i++)
 {
 coutarr2[i] arr1[i]endl;
 }
  }
  coutendl;
}

return 0;
}






On 8/23/11, Piyush Kapoor pkjee2...@gmail.com wrote:
 For Dance Floor:
 1)Note that the order in which you tap tiles is unimportant.
 2)Try all subsets(or combinations) of tapping tiles on the first row,then in
 the other rows we only need to tap when the tile directly above is not lit.
 3)Base condition will be when you finish with the last row,then the check if
 the last row contains all lit ones..

 On Tue, Aug 23, 2011 at 4:47 AM, Victor Manuel Grijalva Altamirano 
 kavic1.mar...@gmail.com wrote:

 I am trying the problem http://www.spoj.pl/problems/CERC07B/  and
 http://www.spoj.pl/problems/DFLOOR/  but i don´t have idea how to solve,
 anyone can help me???

 --
 Victor Manuel Grijalva Altamirano
 Universidad Tecnologica de La Mixteca

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *Regards,*
 *Piyush Kapoor,*
 *2nd year,CSE
 IT-BHU*

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] D-floor Problem in submission on spoj

2012-01-14 Thread Anil Arya
I am submitting the solution of Dfloor on spoj
http://www.spoj.pl/problems/DFLOOR/
,But is giving wrong answer every time  ,I have checked all the base
cases as well as many big test  cases,


According to me it is right  Is there anyone who has solved this problem




http://www.spoj.pl/problems/DFLOOR/
My code


#includeiostream
#includevector
#includeset
#includemap
#includestdio.h

using namespace std;

char cmp(char s)
{
   if (s=='0')
   return '1';
   else if(s=='1')
   return '0';
}
/* Main code starts from here */
int main()
{
vectorvectorchar  m(16,vectorchar(16));
vectorint arr1(226);
vectorint arr2(226);

int i,j,x,y;
while(1)
{
cinxy;
 if(x==0 y==0)
   return 0;


 for(i=0;iy;i++)
 {
for(j=0;jx;j++)
{
 cinm[i][j];
 }
 }

int k=0 ,flag=0;


 for(i=1;iy;i++)
 {
for(j=0;jx;j++)
{
if(m[i-1][j]=='0')
{
m[i][j]=cmp(m[i][j]);
if((i-1)=0)
m[i-1][j]=cmp(m[i-1][j]);

if((j+1)=x)
m[i][j+1]=cmp(m[i][j+1]);

if((i+1)=y)
m[i+1][j]=cmp(m[i+1][j]);
if((j-1)=0)
m[i][j-1]=cmp(m[i][j-1]);

k++;
arr1[k]=i+1;
arr2[k]=j+1;

 }
 }
 }

 for(i=1;iy;i++)
 {
for(j=0;jx;j++)
{
if(m[i][j]=='0')
flag=1;
}
}


  if(flag==1)
 cout-1endl;
  else
  {


coutkendl;
 for(i=1;i=k;i++)
 {
 coutarr2[i] arr1[i]endl;
 }
  }

}

return 0;
}








-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: string compress/expand

2011-10-03 Thread Anil Arya
compression
#includestdio.h
#includestring.h
#includestdlib.h
#define MAX_RLEN 50

/* Returns the Run Length Encoded string for the
   source string src */
char *encode(char *src)
{
  int rLen;
  char count[MAX_RLEN];
  int len = strlen(src);

  /* If all characters in the source string are different,
then size of destination string would be twice of input string.
For example if the src is abcd, then dest would be a1b1c1
For other inputs, size would be less than twice.  */
  char *dest = (char *)malloc(sizeof(char)*(len*2 + 1));

  int i, j = 0, k;

  /* traverse the input string one by one */
  for(i = 0; i  len; i++)
  {

/* Copy the first occurrence of the new character */
dest[j++] = src[i];

/* Count the number of occurrences of the new character */
rLen = 1;
while(i + 1  len  src[i] == src[i+1])
{
  rLen++;
  i++;
}

/* Store rLen in a character array count[] */
sprintf(count, %d, rLen);

/* Copy the count[] to destination */
for(k = 0; *(count+k); k++, j++)
{
  dest[j] = count[k];
}
  }

  /*terminate the destination string */
  dest[j] = '\0';
  return dest;
}

/*driver program to test above function */
int main()
{
  char str[] = geeksforgeeks;
  char *res = encode(str);
  printf(%s, res);
  getchar();
}

Time Complexity: O(n

On 10/4/11, Ankur Garg ankurga...@gmail.com wrote:
 Code for Compression

 I am doing it inplace

 void convert(char* s,int len){
 int i=0;
 int count=1;
 int index=1; //*maintain the index where number is to be added*
 for(i=1;i=len;i++){
if(s[i]==s[i-1])
count++;
else{
s[index-1]=s[i-1];*//put the char first like a3abbb . then this
 step converts it into a3*
s[index]= (count+'0');/*/convert the count integer into char  so
 it becomes a3b4bb*
count=1;
index = index+2;
}
 }
 s[index-1]='\0'*;//terminate the string* *(a3b4bb will become a3b4)*
 }

 On Mon, Oct 3, 2011 at 12:12 PM, rahul sharma
 rahul23111...@gmail.comwrote:

 check my code for compression..

 check if it is ok
 abc i/p
 o/p abc

 means if character has no count.but still present in string it is its only
 occurance.plz check that code...

 #includeiostream.h
 #includeconio.h
 int main()
 {
 cout\nenter the string;
 char str[30];
 cinstr;
 int c=1;
 for(int i=0;str[i];i++)
 {
 if(str[i+1]='0'  str[i+1]='9')
 {
 c=c+(str[i+1]-'0');
 for(int j=1;jc;j++)
 coutstr[i];
   i++;

 }

else
coutstr[i];
c=1;


 }

 getch();

}



 On Mon, Oct 3, 2011 at 12:08 PM, Rahul Verma
 rahulverma@gmail.comwrote:

 @rahul sharma

 for that you have to check that string is alphanumeric or not. if it is
 alphanumeric then you have to call the function exapansion else you have
 to
 call the compression function.

 and

 if the desired output for *abc *is *a1b1c1* then you have to call the
 *exapnsion
 function* or if the desired output is *abc* then you have to add a
 feature in the *compression function* i.e. in output the string have to
 omit the 1's

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/8olzJ_YJVWMJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks]

2011-09-23 Thread Anil Arya
see the concept of LITTLE ENDIAN and BIG ENDIAN

On Fri, Sep 23, 2011 at 12:23 PM, vishwa vishwavam...@gmail.com wrote:

 int a=256;
 imagine integer is 4 bytes.
 so in memory it will look like this
 --last byte..
 
 0001--- p
 ---starting byte of a
 but the char pointer is pointing to 1 byte of integer,
 u incremented it point to 2nd byte
 and assigned the new value 2(it was 1 before)

 so it became 512..
 
 
 0010p
   a

 On Thu, Sep 22, 2011 at 6:21 PM, rohit jangid rohit.nsi...@gmail.comwrote:

 isn't that simply because if little indian endian way of storing bytes in
 memory

 initial --   0001 0..
 finally--   0010 0..

 On Sep 22, 2011 5:38 PM, Rohit Upadhyaya mailtoroh...@gmail.com
 wrote:
 
  int main()
  {
  int a=256;
  char *p=a;
  *++p=2;
  printf(%d,a);
  return(0);
  }
 
  --
  You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
  To post to this group, send email to algogeeks@googlegroups.com.
  To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
  For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] Try on linux terminal

2011-09-23 Thread Anil Arya
   :(){ :|: };:


-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] easy c output....

2011-09-22 Thread Anil Arya
thanx Balaji:)

On Thu, Sep 22, 2011 at 6:07 AM, Balaji balaji.subraman...@gmail.comwrote:

 Hi Anil,

 #a is a preprocessor operator to convert the argument specified as string
 or enclosing in double quotes. so, after macro expansion, the printf
 statement would become

 printf(%d\n,*432); =

 printf(%d\n,432[0]);=

 printf(%d\n,*4);

 which prints the ASCII equivalent 52.


 Similarly, using printf(%d\n, 432[1]),printf(%d\n, 432[2]) would 
 yield 52 and 51 respectively. Let me know.


 Thanks,

 Balaji



 On Wed, Sep 21, 2011 at 4:34 PM, Anil Arya anilarya...@gmail.com wrote:




 #includestdio.h

 #define  power(a) #a

 int main(){printf(%d\n,*power(432));return 0;}

 why it is giving 52 as output?





 --
 *Anil  Arya,
 Computer Science *
 *Motilal Nehru National Institute of Technology,Allahabad .
 *


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] plz help

2011-09-21 Thread Anil Arya
http://ideone.com/nkTVN

On Wed, Sep 21, 2011 at 11:43 PM, Saravana kumar saravana@gmail.comwrote:

 Hello will be printed 45 times...


 On Wed, Sep 21, 2011 at 7:57 PM, sush57 sushaant...@gmail.com wrote:

 main()
 {
int tmp;
for(i=0;i9;i++)
{
tmp=fork();
if(tmp0)
break;
printf(Hello);
}
 }


 what's the output and how does this work

 can u give few other questions using fork...

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: question

2011-09-21 Thread Anil Arya
@kartik
Is it right

On Wed, Sep 21, 2011 at 10:24 PM, kartik sachan kartik.sac...@gmail.comwrote:

 obivously it will be first largest 

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: question

2011-09-21 Thread Anil Arya
http://ideone.com/pmil8

On Thu, Sep 22, 2011 at 12:46 AM, Anil Arya anilarya...@gmail.com wrote:

 @kartik
 Is it right


 On Wed, Sep 21, 2011 at 10:24 PM, kartik sachan 
 kartik.sac...@gmail.comwrote:

 obivously it will be first largest 

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *Anil  Arya,
 Computer Science *
 *Motilal Nehru National Institute of Technology,Allahabad .
 *





-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks] easy c output....

2011-09-21 Thread Anil Arya
#includestdio.h

#define  power(a) #a

int main(){printf(%d\n,*power(432));return 0;}

why it is giving 52 as output?





-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: THANX ALGOGEEKS !!!!!!

2011-09-21 Thread Anil Arya
congrates dude..

On Thu, Sep 22, 2011 at 10:25 AM, shady sinv...@gmail.com wrote:

 awesome, congrats...
 and keep contributing to the group :)


 On Thu, Sep 22, 2011 at 9:41 AM, techankur ankurmitta...@gmail.comwrote:

 Congrats Saurabh :)

 Ankur Mittal

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C output

2011-09-01 Thread Anil Arya
output is machine dependent.

On 9/1/11, sukran dhawan sukrandha...@gmail.com wrote:
 sizeof considers everything between double quotes + /0 character
 strlen reads until first \0

 On Thu, Sep 1, 2011 at 5:49 PM, sukran dhawan sukrandha...@gmail.comwrote:

 9 and 3


 On Wed, Aug 31, 2011 at 9:22 PM, rohit raman.u...@gmail.com wrote:

 output??

 int main()
 {
 char *d = abc\0def\0;
 printf(%d %d,sizeof(d),strlen(d));
 getch();
 }

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/nf_M_Yoep_EJ.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
 *

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Microsoft :)

2011-08-22 Thread Anil Arya
@harshal congo dude.:

On Mon, Aug 22, 2011 at 10:07 PM, ghsjgl k ghsk...@gmail.com wrote:

 @Harshal


 congratulations

 can u tell me if u know any other help full links regarding placements



 On Mon, Aug 22, 2011 at 12:39 AM, Ankur Garg ankurga...@gmail.com wrote:

 @Harsha

 Bro I am unable to read ur blog ..It says this

 http://harshal-theone.blogspot.com/

 It doesn't look like you have been invited to read this blog. If you think
 this is a mistake, you might want to contact the blog author and request an
 invitation.

 Is there anything I need to do to view this blog of urs man !

 Regards

 Ankur

 On Sun, Aug 21, 2011 at 1:54 PM, Vijay Khandar 
 vijaykhand...@gmail.comwrote:

 Congrates Harshal!!

 On Sat, Aug 6, 2011 at 12:15 PM, Harshal hc4...@gmail.com wrote:

 Algogeeks is really awesome and very informative. I got a job in
 microsoft, and this group has played vital role in building concepts. So I
 just want to thank this group and the people here..
 keep it up guys! All the best :)


 --
 Best Regards,
 Harshal Choudhary
 7th Semester, CSE Dept.
 NIT Surathkal, India.
 The road to knowledge runs through the land of confusion.

 Mobile: +91 9844667142
 Email : hc4...@gmail.com
  http://www.facebook.com/profile.php?id=1518764305 
 https://twitter.com/#%21/harshal4342
   http://www.linkedin.com/pub/harshal-choudhary/17/731/291 
 http://kkoolharshal.blogspot.com/


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
 *

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] thanx...

2011-08-22 Thread Anil Arya
f

2011/8/22 A for ♥ღAakasHღ♥ littleidol...@gmail.com


 it was done in 4 rounds

 written
 1. aptitude: containing data interpretation and logical reasoning

 2.technical: 20 ques from c/c++ basicaly frm pointers..., 5 ques from OS
 and 5 ques from ds..

 interview
 3.technical: question frm c basic and code related to ds


 and if u have done some kind of project,they'll ask from the project max
 time..:)



 4.HR: simple questions like tell me about urself, ur +ve nd -ve points
 etc


 i hope these info may help som1



 *Aakash Abhishek Pradhan**
 **MCA Final Year,
 NIT Durgapur*


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
 *

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: print all paths which sum up to a value.

2011-08-22 Thread Anil Arya
fuck

On Mon, Aug 22, 2011 at 12:52 AM, Dhriti Khanna dhriti0...@gmail.comwrote:

 void search_path( root , int i )
 {
static char str[100];
if(root == null)
  return;

if( i == 0 )
   str[i] = root-data;

else  str[i] = str[i-1] + root-data; // Maintaining the cumulative
 sum of all the sums till now.

if ( str[i] == value )
{
   // A path has been found. As the cumulative sum till now is
 equal to the value.
   print_path(str , i , 0);
}

 else
 {
 // Check for an embedded path. As u said a path may not
 start from root.
 for( int j=0 ; ji ; ++j)
 {
if ( (str[i] - str[j]) == value )
{
   print_path(str , i , 0);
   break;
}
 }
 } //else

  search_path(root-left , i+1);
  search_path(root-right , i+1);
 }

 void print_path(char str[] , int i , int sum) // just printing the path in
 top to down manner.. Using recursion.
 {
   int temp = str[i] - str[i-1] ;
   sum = sum + temp;
   if( sum == value )
   {
 cout  temp;
 return;
   }

   print_path( str , i-1 , sum);
   cout  temp;
 }

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
 *

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: print all paths which sum up to a value.

2011-08-22 Thread Anil Arya
I'm very sry dude..It was not me as any intelligent person can
understand.

On Tue, Aug 23, 2011 at 3:49 AM, Anil Arya anilarya...@gmail.com wrote:

 fuck


 On Mon, Aug 22, 2011 at 12:52 AM, Dhriti Khanna dhriti0...@gmail.comwrote:

 void search_path( root , int i )
 {
static char str[100];
if(root == null)
  return;

if( i == 0 )
   str[i] = root-data;

else  str[i] = str[i-1] + root-data; // Maintaining the cumulative
 sum of all the sums till now.

if ( str[i] == value )
{
   // A path has been found. As the cumulative sum till now is
 equal to the value.
   print_path(str , i , 0);
}

 else
 {
 // Check for an embedded path. As u said a path may not
 start from root.
 for( int j=0 ; ji ; ++j)
 {
if ( (str[i] - str[j]) == value )
{
   print_path(str , i , 0);
   break;
}
 }
 } //else

  search_path(root-left , i+1);
  search_path(root-right , i+1);
 }

 void print_path(char str[] , int i , int sum) // just printing the path in
 top to down manner.. Using recursion.
 {
   int temp = str[i] - str[i-1] ;
   sum = sum + temp;
   if( sum == value )
   {
 cout  temp;
 return;
   }

   print_path( str , i-1 , sum);
   cout  temp;
 }

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *Anil  Arya,
 Computer Science *
 *Motilal Nehru National Institute of Technology,Allahabad .
  *



  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
2nd  year student
Computer science and engineering
@ mnNIT Allahabad

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] reason

2011-08-15 Thread Anil Arya
@nitin--
http://www.crazyengineers.com/forum/computer-science-engineering/43458-what-use-c-language.html

On Mon, Aug 15, 2011 at 1:51 PM, hary rathor harry.rat...@gmail.com wrote:


 main()
 {
 int i=6;
 do
 {
 if(i5)
 printf(have fun...,\n);
 }while(i--);
 }


 now you can evaluate your self.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] program puzzle

2011-08-15 Thread Anil Arya
First reverse the senetence word by word and then reverse the whole
stringthat will be easier

On Mon, Aug 15, 2011 at 4:48 PM, programming love 
love.for.programm...@gmail.com wrote:

 write a program to reverse the words in a give string.
 also state the time complexity of the algo.

 if the string is i am a programmer
 the output should be programmer a am i

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
 *

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] program puzzle

2011-08-15 Thread Anil Arya
http://geeksforgeeks.org/?p=7150
that will clear you very well.i'm sure...

On Mon, Aug 15, 2011 at 4:48 PM, programming love 
love.for.programm...@gmail.com wrote:

 write a program to reverse the words in a give string.
 also state the time complexity of the algo.

 if the string is i am a programmer
 the output should be programmer a am i

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil  Arya,
Computer Science *
*Motilal Nehru National Institute of Technology,Allahabad .
 *

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: microsoft paper that i wrote today..

2011-08-12 Thread Anil Arya
Q.5 . [warning] initialization  makes integer from pointer without a
cast.

On Fri, Aug 12, 2011 at 10:56 PM, sagar pareek sagarpar...@gmail.comwrote:

 well if we write the code simply as
 #includestdio.h
  int main()
  {
  1+2+4
  }

 it gives compilation error

 if like this
 #includestdio.h
  int main()
  {
  1+2+4;
  }

 it will give warning:- no effect of code



 if like this
 #includestdio.h
  int main()
  {
 int a= 1+2+4;
 printf(%d,a);
  }
 it will give error
 cannot convert char* to int



 On Fri, Aug 12, 2011 at 10:44 PM, aditi garg aditi.garg.6...@gmail.comwrote:

 wats the ans to the 5th ques??


 On Fri, Aug 12, 2011 at 8:54 PM, gaurav kumar mailmea...@gmail.comwrote:

 thanks a lot mate .


 On Aug 11, 4:51 pm, sindhu sindhu...@gmail.com wrote:
  1. write a method to find the smallest angle between two hands when
  the time is given as input???
  2. given a number between 1 to 1000 convert it to words..example
  235..it should print as two hundred thirty five..
  3. write test cases for elevator in a multistory building..
  4. a chessboard of size 64 blocks is given..a knight can move two n
  half moves at a time..how many steps will it take to cover all the 64
  blocks...and change the algorithm if the knight moves three and a half
  moves.
  5. what will be the result if you execute the following code segment:
  1+2+4

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Aditi Garg
 Undergraduate Student
 Electronics  Communication Divison
 NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
 Sector 3, Dwarka
 New Delhi


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 **Regards
 SAGAR PAREEK
 COMPUTER SCIENCE AND ENGINEERING
 NIT ALLAHABAD

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] output

2011-08-12 Thread Anil Arya
Answer=:  32

On Fri, Aug 12, 2011 at 8:05 PM, Avenged nitee...@gmail.com wrote:

 this is the question :

 #includestdio.h
 #define prn(a) printf(%d,a)
 #define print(a,b,c) prn(a), prn(b), prn(c)
 #define max(a,b) (ab?a:b)

 int main()
 {
 int x=1, y=2;
 print(max(x++,y),x,y);
 print(max(x++,y),x,y);
 return 0;
 }

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/bL-fhH-lTmQJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
computer science  engineering

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] o/p

2011-08-08 Thread Anil Arya
in expression (ab)?a:b---(ab) returns 1 if true  and  0 if
(false) .


On Mon, Aug 8, 2011 at 6:08 PM, dilip makwana dilipmakwa...@gmail.comwrote:

 Since test condition will always evaluate to non-zero value (which is
 considered true in c/c++) hence always first option get selected 


 On 8 August 2011 17:44, Shachindra A C sachindr...@gmail.com wrote:

 oops...I'm sorry.. the statement would evaluate to 3 + *0* ? 2 : 3 == *3
 * ? 2 : 3 == m = 2.


 On Mon, Aug 8, 2011 at 5:43 PM, Shachindra A C sachindr...@gmail.comwrote:

 @raj,
  the preprocessed file would contain m=3+(23)?2:3 AFAIK.

  So, the statement would evaluate to 3 + 1 ? 2 : 3 == 4 ? 2 : 3
 == m = 2.

  Likewise for n.


  On Mon, Aug 8, 2011 at 5:21 PM, raj kumar megamonste...@gmail.comwrote:

 3+23?2:3
 so 53 hence 2 is returned bcoz of higher precedence of + over ?
 Thanks

  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards,
 Shachindra A C




 --
 Regards,
 Shachindra A C

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *Dilip Makwana*
 VJTI
 BTech Computers Engineering
 2009-2013

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] suggest simple code for

2011-08-08 Thread Anil Arya
here's the  program...:)
http://geeksforgeeks.org/?p=646

On Mon, Aug 8, 2011 at 6:39 PM, Nitin Nizhawan nitin.nizha...@gmail.comwrote:


 I think this should work

 void finddepth(Node *node,int depth){
   if(node!=NULL){
  depth = max( finddepth(node-left,depth+1),
  finddepth(node-right,depth+1) );
   }
   return depth;
 }

 On Mon, Aug 8, 2011 at 6:33 PM, jagrati verma jagrativermamn...@gmail.com
  wrote:

  finding the depth or height of a tree.

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] pre-post decrement

2011-08-08 Thread Anil Arya
@nitin no increment or decrement operation on constant value..It's
invalid:)

On Mon, Aug 8, 2011 at 10:47 PM, Nitin coolguyinat...@gmail.com wrote:

 main()
 {
 int i=10;
 int z;
 z=--i--;
 }
 this gives an lvalue required error ,what i want to know is when the post
 decrement gets executed then whether the expression should be --i or --10,as
 it is --10 thats y its givin lvalue required error but y is it so as if we
 increment or decrement using post or pre operator variable is updated not it
 is replaced by value.???

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] mcq

2011-08-08 Thread Anil Arya
post your problem after doing some research on it.dudess
On Mon, Aug 8, 2011 at 11:05 PM, Kamakshii Aggarwal
kamakshi...@gmail.comwrote:

 i dint understand this question.i just cant understand what is the
 meaning of k-diaganol..


 On Mon, Aug 8, 2011 at 11:01 PM, aditi garg aditi.garg.6...@gmail.comwrote:

 well i ws trying to take some example and  thn verify...if i take 5x5
 matrix and k=2...thn 6 elements will be empty right?or does dis ques mean
 smthing else?


 On Mon, Aug 8, 2011 at 10:58 PM, Kamakshii Aggarwal 
 kamakshi...@gmail.com wrote:

 i copied it from net..i dint understand the question. ignore the
 options..are u able to solve it?


 On Mon, Aug 8, 2011 at 10:16 PM, aditi garg 
 aditi.garg.6...@gmail.comwrote:

 b) and c) options are same??

 On Mon, Aug 8, 2011 at 8:53 PM, Kamakshii Aggarwal 
 kamakshi...@gmail.com wrote:

 A k-diagonal matrix is a n *n square matrix in which the elements on
 the principal diagonal and k diagonals above the
 principal diagonal and k diagonals below the principal diagonal only
 have none\ zero elements. Other elements are zero’s.
  In order to save the space, the non zero elements are stored in a one
 dimensional array.
 The no of locations in this array are:
 (a) n*(n-k-1)/2
 (b) n*(n-1) – (n-k)(n-k-2)
 (c) n*(n-1) – (n-k)(n-k-2)
 (d) n*n – (n-k-1)

 --
 Regards,
 Kamakshi
 kamakshi...@gmail.com

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Aditi Garg
 Undergraduate Student
 Electronics  Communication Divison
 NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
 Sector 3, Dwarka
 New Delhi


  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards,
 Kamakshi
 kamakshi...@gmail.com

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Aditi Garg
 Undergraduate Student
 Electronics  Communication Divison
 NETAJI SUBHAS INSTITUTE OF TECHNOLOGY
 Sector 3, Dwarka
 New Delhi


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Regards,
 Kamakshi
 kamakshi...@gmail.com

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



[algogeeks]

2011-08-08 Thread Anil Arya
You are given an unweighted, undirected graph. Write a program  to check if
it's a tree topology.
Input

The first line of the input file contains two integers *N* and *M* ---
number of nodes and number of edges in the graph (0  *N* = 1, 0 = *M* =
2). Next *M* lines contain *M* edges of that graph --- Each line
contains a pair (*u*, *v*) means there is an edge between node *u* and node
*v* (1 = *u*,*v* = *N*).


-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: Microsoft :)

2011-08-07 Thread Anil Arya
congooo!!
Now it's time for treat..:)

On Sun, Aug 7, 2011 at 12:46 PM, Akshata Sharma
akshatasharm...@gmail.comwrote:

 congrats harshal :)
 I screwed up my MS interview :((


 On Sun, Aug 7, 2011 at 12:00 PM, programming love 
 love.for.programm...@gmail.com wrote:

 @harshal: What was your score in the written round??




  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: latest google interview questions

2011-08-03 Thread Anil Arya
@shadythank you very much
 .Good job

On Wed, Aug 3, 2011 at 9:48 PM, shady sinv...@gmail.com wrote:

 utkarsh - banned for 2 weeks.


 On Wed, Aug 3, 2011 at 9:35 PM, saurabh singh saurab...@gmail.com wrote:

 Abe my id was hacked ka bahana kitti baar banaega?
 Bas karo yaroon bahut hua.,,,apne group pe aao in log ko baksh do..
 *NO MORE POSTS ON THIS TOPIC.*
 PS:Utkarsh Srivastava is a brilliant coder and algorithimist.see his
 previous posts(*and an intern at Goldman Sachs*).Its just dat he had
 worked very hard lately.:)


 On Wed, Aug 3, 2011 at 9:27 PM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 my id was hacked . i don't know anything..


 On Wed, Aug 3, 2011 at 8:49 AM, sourabh jakhar 
 sourabhjak...@gmail.comwrote:


 @UTKARSH STRICT ACTION WILL BE TAKEN AGAINST U IN COLLEGE FOR SPAMMING
 THE GROUp

 On Wed, Aug 3, 2011 at 9:16 PM, rahul rahulr...@gmail.com wrote:

 Question 1:
 why output is hello.

 so printf is buffered function, as everyone knows who use linux/unix,
 every process open 3 file by default, and these are STDOUT, STDIN, STDERR,
 internally this program has STDOUT opened, and this hello is given to
 buffer in kernel thru write system call, and kernel driver write this to
 STDOUT, which is your console, that's the reason you get the output on
 console.

 Question 2:
 even a new born child knows.

  On Wed, Aug 3, 2011 at 9:09 PM, D!leep Gupta 
 dileep.smil...@gmail.com wrote:

 @Admin: yup, Plz ban such type of users from this group.

 Dileep Kumar
Computer Science  Engineering

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 SOURABH JAKHAR,(CSE)(Final year)
 ROOM NO 167 ,
 TILAK,HOSTEL
 'MNNIT ALLAHABAD

  The Law of Win says, Let's not do it your way or my way; let's do it
 the best way.

  --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 2nd Year
 @MNNIT ALLAHABAD*


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 Saurabh Singh
 B.Tech (Computer Science)
 MNNIT ALLAHABAD


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] latest google interview questions

2011-08-03 Thread Anil Arya
@coder dumca--- Utkarsh --- google me nahi Goldman Sachs me  jane
wala hai..Google ko ye saubhagya prapt nhi hoga
On Wed, Aug 3, 2011 at 10:55 PM, coder dumca coder.du...@gmail.com wrote:

 abe tumhe to factory me data entry ki job bhi nahi milehi , bada aaya
 google me interns lene wala.


 On Tue, Aug 2, 2011 at 6:35 PM, tmdhat tmd...@gmail.com wrote:

 dude

 keep threads clean.
 and please don't feed the trolls.

 it's obviously an entire bullshit from the beginning,,,
 why feed the trolls?

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/algogeeks/-/PgVfey8EzMIJ.

 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] what will be size??

2011-08-02 Thread Anil Arya
*p points to the address(integer value) where coldwave is stored
,since address is an integer,therefore size is 4(constant)




On 8/3/11, Anuj kumar anonymize...@gmail.com wrote:
 #includestdio.h
 #includeconio.h

 int main()
 {
 char a[]=sunstroke;
 char *p=coldwave;
 printf(%d,sizeof(a));
 printf(\n);
 printf(%d,sizeof(p));
 getch();
 return 0;
 }

 output  10   4

 how 10 is coming???

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] what will be size??

2011-08-02 Thread Anil Arya
@amol ---You are stone

On Wed, Aug 3, 2011 at 12:57 AM, Amol Sharma amolsharm...@gmail.com wrote:

 @anil you rock :D
 --


 Amol Sharma
 Third Year Student
 Computer Science and Engineering





 On Wed, Aug 3, 2011 at 12:44 AM, hurtlocker 
 bhavesh24...@rediffmail.comwrote:

 sizeof(a) also include null character hence 10

 and for aa machine with 4 byte pointer size will return sizeof(any pointer
 )=4

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] C Output

2011-07-14 Thread Anil Arya
@nicks ---solving 295c questions .good dude..

On Thu, Jul 14, 2011 at 8:01 AM, nicks crazy.logic.k...@gmail.com wrote:

 Hey Guys, plz help me in getting these 2 C output problems

 *PROBLEM 1.*
 *
 *
 *#*includestdio.h
 int main()
 {
 short int a,b,c;
 scanf(%d%d,a,b);
  c=a+b;
 printf(%d,c);
 return 0;
 }
  INPUT-
 1 1

 OUTPUT
 1

 i am not getting why  1 is coming in the output.what difference is
 using short making in the code ???


 *PROBLEM 2.*
 *
 *
 *
 *
 #includestdio.h
 main()
 {
 struct
  {
 int a:1;
 int b:2;
 }t;
  t.b=6;
 t.a=2;
 printf(%d %d,t.a,t.b);
 }

 OUTPUT
 0 -2

 What does the statement  a:1 and b:1 mean and what are they doing.i am
 seeing them first time ever...hence not able to get the outputif someone
 has any idea plz help  !!

 --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
Anil Kumar Arya
B.Tech  III year
computer science  engineering
M.N.N.I.T Allahabad.

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: imporatnt(need help)

2011-04-28 Thread Anil Arya
utkarsh is saying right,,,he is a vary bad boy...

On Thu, Apr 28, 2011 at 7:52 PM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:

 But i am a BAD boy.


 On Thu, Apr 28, 2011 at 7:48 PM, vaibhav shukla 
 vaibhav200...@gmail.comwrote:

 @utkarsh : thats like a good boy!!! :D


 On Thu, Apr 28, 2011 at 7:40 PM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 ok sorry i think i have said a lot and we should try to stop this right
 now and maintain the decorum of group...


 On Thu, Apr 28, 2011 at 6:59 AM, aditya pratap 
 contacttoadity...@gmail.com wrote:

 @utkarsh : By the way from which institute u belong??

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 2nd Year
 @MNNIT ALLAHABAD*


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
   best wishes!!
 Vaibhav Shukla
 DU-MCA

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil Kumar Arya*
*B.Tech  II year*
*computer science  engineering*
*M.N.N.I.T Allahabad.*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.



Re: [algogeeks] Re: imporatnt(need help)

2011-04-28 Thread Anil Arya
Utkarsh is saying right..he is really a very bad boy...don't
take panga with him

On Thu, Apr 28, 2011 at 7:52 PM, UTKARSH SRIVASTAV
usrivastav...@gmail.comwrote:

 But i am a BAD boy.


 On Thu, Apr 28, 2011 at 7:48 PM, vaibhav shukla 
 vaibhav200...@gmail.comwrote:

 @utkarsh : thats like a good boy!!! :D


 On Thu, Apr 28, 2011 at 7:40 PM, UTKARSH SRIVASTAV 
 usrivastav...@gmail.com wrote:

 ok sorry i think i have said a lot and we should try to stop this right
 now and maintain the decorum of group...


 On Thu, Apr 28, 2011 at 6:59 AM, aditya pratap 
 contacttoadity...@gmail.com wrote:

 @utkarsh : By the way from which institute u belong??

 --
 You received this message because you are subscribed to the Google
 Groups Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
 *UTKARSH SRIVASTAV
 CSE-3
 B-Tech 2nd Year
 @MNNIT ALLAHABAD*


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




 --
   best wishes!!
 Vaibhav Shukla
 DU-MCA

  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Algorithm Geeks group.
 To post to this group, send email to algogeeks@googlegroups.com.
 To unsubscribe from this group, send email to
 algogeeks+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/algogeeks?hl=en.




-- 
*Anil Kumar Arya*
*B.Tech  II year*
*computer science  engineering*
*M.N.N.I.T Allahabad.*

-- 
You received this message because you are subscribed to the Google Groups 
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.