Results 1 to 5 of 5

Thread: C : How to use cscanf

  1. #1
    Join Date
    Dec 2009
    Posts
    31

    C : How to use cscanf

    Hello, I am studying in the first year of the Bsc(IT). I have the knowledge about the C language. I know about the cscanf function of the C language. But I don't heard about the cscanf. I would like to know about the cscanf function. I would also like to know about the what is the purpose of the cscanf and how cscanf can be used in the program. So, If anyone has knows about cscanf then then post me reply as soon as possible. Please reply me!!!!!!!!!!

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    How to use cscanf

    Hi, Avoiding buffering both by library and by the DOS, cscanf function directly reads from the standard input device. Under the control of the argument format the cscanf() function scans input from the console. Following the format string is a list of addresses to receive values. This cscanf() function can uses the getche() function from the console to read characters. Under the description of the scanf() function, the format string can be described. I hope you understand about cscanf function.

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    cscanf : C

    According to my knowledge of the cscanf() function, When the scanning can be comes to an end by reaching to the end of the input stream the cscanf() function can returns End Of File. Otherwise, the number of input arguments for which values were successfully scanned and stored is returned. The errno variable that is global variable may be set when a file input error can occurs. Syntax :
    #include <conio.h>
    int cscanf( const char *format, ... );

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Program : How to use cscanf

    I suggest you to carefully see the following code of lines that can help you to know about the cscanf() function more easily and efficiently. To scan a date in the form " Sunday May 18 1988":
    #include <conio.h>
    void main()
    {
    int dy, yr;
    char wkdy[10], mnth[12];
    cscanf( "%s %s %d %d",
    wkdy, mnth, &dy, &yr);
    cprintf( "\n%s, %s %d, %d\n",
    wkdy, mnth, dy, yr );
    }

  5. #5
    Join Date
    Nov 2005
    Posts
    1,323

    re: C : How to use cscanf

    I think the, Programmers could use the different derivatives of scanf function that is depending upon the actual source of input. The cscanf is one of the scanf function. The cscanf() function derivative reads input from a character string passed as the first argument. The prototypes of the cscanf() function are as follows :
    int cscanf (const char *str, const char *format, ...);

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,095,349.30192 seconds with 15 queries