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+");
Type: Posts; User: Thomas79
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+");
Try this, Notice the do while statement while scaning and printing into the file~
#Include <stdio.h>
int main()
{
int num;
clrscr (); clears the previous output from the screen.
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...
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'.
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!...
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...
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++)
{