Re: entering more characters



Why don't u do a bounce check? never get past an array limit


kk wrote:
> Hi all,
>
> in the following code, i enter more characters into a character array.
> array size declared as 80. i enter more characters then i get
> segmentation fault. if anybody knows give me reply.
> thanks in advance.
>
> Regards
> kk
>
>
> main()
> {
> char s[80];
> scanf("%[^\n]s",s);
> printf("%s",s);
> }

.



Relevant Pages

  • Re: sending echo to all clients
    ... I did initialize it up properly, ... There is only one array and that is an array of pollfd structures named ... as an array of characters only but then I can't because sendsends bytes ... you receive C-style strings, so there's really no point to doing it. ...
    (comp.unix.programmer)
  • Re: Subquery Confusion
    ... Then I got this crazy idea that an Array can only contain a maximum ... number of characters, ... Then I decide that maybe I'm completely wrong with my query, ... it out of Excel VBA and spit it into Microsoft SQL Server Management ...
    (microsoft.public.excel.programming)
  • Re: ifstream::get() surprise
    ... Extracts characters and stores them into successive locations ... > null character into the next successive location of the array. ... since the rule is to post the shortest code suffering from the ...
    (comp.lang.cpp)
  • Re: Problem with inserting bytea into postgresql
    ... > This byte array is serialized object. ... > ByteArrayOutputStream outputStream = new ByteArrayOutputStream; ... and the characters are encoded via UTF-8. ...
    (comp.lang.java.help)
  • Re: Parsing binary values in the registry
    ... how to take a string variable that could concievably be up to 300 ... and split that into either an array or multiple variables for ... every 32 characters within the original varable. ... I am trying to build a file path from a binary value in the ...
    (microsoft.public.scripting.vbscript)