Search:

Type: Posts; User: Thomas79

Search: Search took 0.00 seconds; generated 8 minute(s) ago.

  1. Thread: File problem

    by Thomas79
    Replies
    12
    Views
    1,777

    try this,,notice that I have included the do...

    try this,,notice that I have included the do ...while function, while reading and printing your file!

    #include <stdio.h>

    int main()
    {
    int num;
    FILE *in;

    in=fopen("test.txt","r+");
  2. Thread: File problem

    by Thomas79
    Replies
    12
    Views
    1,777

    Try this, Notice the do while statement while...

    Try this, Notice the do while statement while scaning and printing into the file~


    #Include <stdio.h>



    int main()
    {
    int num;
  3. Thread: clear screen

    by Thomas79
    Replies
    7
    Views
    1,283

    clrscr (); clears the previous output from the...

    clrscr (); clears the previous output from the screen.
  4. Replies
    8
    Views
    1,516

    You can also do the following to save time~\\:) ...

    You can also do the following to save time~\\:)

    #include <stdio.h>

    int find_max (int a, int b);

    int main ()
    {
    int max, a = 1, b = 2;
    \* I am nullifyig this statement as we do not need...
  5. Replies
    6
    Views
    1,629

    Re: question about a piece of code

    char board [9] is an array of datatype 'character' which can store upto 9 alphabets(without spaces).

    Hence in your example, the variable board can store something like 'functions'.
  6. Replies
    3
    Views
    1,858

    Re: What's wrong with this code?

    m not sure but dont you think it would be better if you declared your structure in the main function ??

    Secondly

    char *p1 is only one byte of memory space. This can store just one alphabet!...
  7. Thread: scanf issue

    by Thomas79
    Replies
    6
    Views
    3,804

    Re: scanf issue

    actually it is advisable to leave a space before the % sign.

    eg : scanf ("<space>%s", &test);

    This is specially relevant when we declare more than two characters.

    without the space..when you...
  8. Replies
    11
    Views
    2,094

    Re: Simple Code Gone Wrong

    This will solve your problem!!

    # include <stdio.h>
    # include <conio.h>
    void main ()
    {
    int i,j;
    char a='2';
    for (i=1;i<6;i++)
    {
Results 1 to 8 of 8