User Profile

Collapse

Profile Sidebar

Collapse
nearestniladri2003
nearestniladri2003
Last Activity: May 15 '07, 12:21 PM
Joined: May 4 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Simple code for reading word by word from a .txt or .doc file

    #include <stdio.h>
    #include <conio.h>

    void main() {
    FILE *fp;
    char a,data[100];//Just taking 100 bytes not more that that.
    int i = 0,count = 0;

    fp = fopen("C:\\mydo c.txt","r");
    // Here my file is stored at C:\ as mydoc.txt
    clrscr();
    if(fp == NULL) {
    printf("ERROR READING FILE\n");
    getch();
    exit(0);...
    See more | Go to post

  • nearestniladri2003
    started a topic Simple code for de-comment a .C file
    in C

    Simple code for de-comment a .C file

    //This code will output this code file with out the comment lines
    #include <stdio.h>
    #include <conio.h>

    void main() {
    FILE *fp;
    char data,chardata;
    fp = fopen("\\OUTPUT .C","r");
    clrscr();
    //This is the start of this code
    /* This part opens the file and
    * reads the contents.
    */
    if(fp == NULL) {
    printf("CAN...
    See more | Go to post

  • nearestniladri2003
    replied to signigicance of VOID in C language
    in C
    near (type modifier)

    Forces pointers to be near; generates function code for a near call and a
    near return.

    Syntax:
    <type> near <pointer definition> ;
    <type> near <function definition>

    The first version of near declares a pointer to be one word with a range of
    64K.

    This type modifier is usually used when compiling in the medium,...
    See more | Go to post

    Leave a comment:


  • nearestniladri2003
    replied to signigicance of VOID in C language
    in C
    inline (keyword): Declares/defines C++ inline functions

    Syntax:
    <datatype> <function>(<par ameters>) { <statements>; }
    inline <datatype> <class>::<funct ion> (<parameters>) { <statements>; }

    In C++, you can both declare and define a member function within its class.
    Such functions are called inline.

    The first syntax example...
    See more | Go to post

    Leave a comment:


  • nearestniladri2003
    replied to signigicance of VOID in C language
    in C
    EXTERN (keyword): Indicates that the actual storage and initial value of a variable, or body
    of a function, is defined elsewhere, usually in a separate source code
    module.

    Syntax:
    extern <data definition> ;
    extern <function prototype> ;

    The keyword extern is optional for a function prototype.

    Example:
    extern int _fmode;
    extern void Factorial(int...
    See more | Go to post

    Leave a comment:


  • nearestniladri2003
    replied to signigicance of VOID in C language
    in C
    VOLATILE: The reason for having this type qualifier is mainly to do with the problems that are encountered in real-time or embedded systems programming using C. Imagine that you are writing code that controls a hardware device by placing appropriate values in hardware registers at known absolute addresses.
    Let's imagine that the device has two registers, each 16 bits long, at ascending memory addresses; the first one is the control and...
    See more | Go to post

    Leave a comment:


  • nearestniladri2003
    replied to signigicance of VOID in C language
    in C
    VOID: void (type)-Empty data type

    When used as a function return type, void means that the function does not
    return a value.

    void hello(char *name)
    {
    printf("Hello, %s.",name);
    }

    When found in a function heading, void means the function does not take any
    parameters.

    int init(void)
    {
    return 1;
    }
    ...
    See more | Go to post

    Leave a comment:


  • nearestniladri2003
    replied to Running .EXEs From A String Path
    in C
    Enable your program to load and run other files (child processes)

    Use these execl... functions when you know how many separate arguments
    you'll have:

    Declaration:
    int execl (char *path, char *arg0, ..., NULL);
    int execle (char *path, char *arg0, ..., NULL, char **env);
    int execlp (char *path, char *arg0, ...);
    int execlpe(char *path, char *arg0, ..., NULL, char **env);...
    See more | Go to post

    Leave a comment:


  • nearestniladri2003
    replied to Error
    in C
    Each and every time we write a code, that is verified by the compiler generated syntax & semantics tree. Which part does not match with the tree, compiler throws an error.... This is known as compilation time error / syntactic error.
    The runtime errors are the errors, which are generated by the environment, or the logical errors as divided by zero error. The runtime errors, which are generated by the operating system, are like Lvalue...
    See more | Go to post

    Leave a comment:


  • You can use this following code and where I have written "USE ARRAY", use your array there....

    ::code removed per Posting Guidelines::


    HAPPY CODING in "C" - Representing the whole COMPUTER
    See more | Go to post
    Last edited by sicarie; May 4 '07, 01:55 PM. Reason: Violates Posting Guidelines

    Leave a comment:


  • nearestniladri2003
    replied to how to clear display
    in C
    Did you try this?
    printf("/r Hello");
    I feel this is the simplest way to do that..... I have tried in Turbo C++ (Ver 3.0).


    Happy Coding in "C" - Representing the whole COMPUTER
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...