Re: can any bdy help me



shanti wrote:

i have developed a c-code to push integers into a stack (an array).
in the program there are three inputs which has to be given through
keyboard. the inputs are "choice", "option","S_R_NO" and "i" all are
defined as "int".
now when the inputs given are int type the program behaviour is as
required. but when the input given are char type the program is
executing infinite loop.i could not understand this behaviour and i
am unable to start. the code is developed on turbo-c and it is
executiable.

can any one help me in finnding the bug and tell me the better way of
doing.
-------------------------------------------------------------------
#include<stdio.h>

This is OK

#include<conio.h>
#include<iostream.h>

These don't exist in standard C. You would also be better off
inserting spaces, as "#include <stdio.h>".

Thus no answer is available here, where we deals solely with
standard C as described in the C standard. Look for some newsgroup
with Borland or Turbo in its name. Or, better, look for an
up-to-date compiler.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>
<http://www.securityfocus.com/columnists/423>
<http://www.aaxnet.com/editor/edit043.html>
<http://kadaitcha.cx/vista/dogsbreakfast/index.html>
cbfalconer at maineline dot net



--
Posted via a free Usenet account from http://www.teranews.com

.



Relevant Pages

  • Re: Finding number of bits of integer
    ... pete said: ... guaranteed to be representable as an int type value. ... If you can deduce from the standard that it ...
    (comp.lang.c)
  • Re: C language on 8-bit microcontrollers
    ... can't represent 'int' data in 8 bits, as it contradicts the standard (the ... int type must contain at least 16 bits to hold the range of values). ... mean, compilers used on 8-bit processors are not standard compliant, or they ...
    (comp.lang.c)
  • Re: C language on 8-bit microcontrollers
    ... can't represent 'int' data in 8 bits, as it contradicts the standard (the ... int type must contain at least 16 bits to hold the range of values). ... mean, compilers used on 8-bit processors are not standard compliant, or they ...
    (comp.lang.c)
  • Re: range limitation
    ... Is your system complies with any C standard? ... I'm not sure about what you mean by using only the int type, ...
    (comp.lang.c)