I'm using (MinGw) gcc compiler but it didn't warned me.
but gcc is a good compiler.
Type: Posts; User: sagar474
I'm using (MinGw) gcc compiler but it didn't warned me.
but gcc is a good compiler.
where char is 1 byte in 32 bit system weather it is signed or unsigned.
from this bellow program why it is printing it as 32 bit number when it is signed ? I'm running this program on 32 it w7.
...
a good book is great. but just reading books dos not help us to be a good programmer.
you should work with some programming logics.
develop your own programs of your interest.
take challenges....
yes
while ((ch = fgetc(fs1))!=EOF)
{
fputc (ch,ft);
}
sorry I relay confused with turbo c and tiny c.
themidget
you did very good effort.
but why you using tcc. which is out dated since 1991.
in our college year we too used the tcc. but i cant understand why to use such old compilers for such a...
sorry it is my mistake
hence fixed ``chunk'' is read.
Help - IBM Mac OS X Compilers
read the line in the above link.
Use the low-level I/O functions, such as open and close. These functions are faster and more...
anduril462
your lines will help me to avid or fix bugs also in future development.
i think this board is full of well experienced developers.
I really thankful to you since I'm learning a...
yes compiler warned me but i ignored. when you pointed out i red about it. yes it is dangerous. instead can i replace it with fgets ?
why should we call a function every time even tho the logic...
Stream I/O is BUFFERED: That is to say a fixed ``chunk'' is read from or written to a file via some temporary storage area (the buffer). NOTE the file pointer actually points to this buffer.
it is...
you can also use this instead of while loop and char by char.
fread(string,sizeof(char),sizeof(char)*sz,fptr1);
string[sz]='\0';
fclose(fptr1);
hear is the another way with out performing reallocation.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
FILE *fptr1;
yes you are correct. it is a good idea if the file is too large. but we have to use if condition to check weather the memory is sufficient or not for each time. this again slows down the program. ...
void showtree(node *root)
{
showtree(root->left);
printf("%d/n",root->data);
showtree(root->right);
}
you are using recursion . and there is no terminating...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char string[100];
int count = 0;
int max=0;
printf("enter string\n");
thank you for your information. commonTater .
this code continuously reallocates a new space for the string.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
FILE *fptr1;
there are two solutatins for your problem
1)create dynamic array and relocating the array multiple times.
2)create dynamic array and use unix low level io and use dynamic memory allocation...
he already changed it.
his latest code is in post 15
I cant understand your logic. but I'm sure the logic is more simple thane that you think.
this program will work as per your description.
#include<stdio.h>
int main()
{
scanf ("%c", val2); ---> scanf ("\n%c", val2); on line 25
add \n before %c
because you press enter after entering previous number. you are also giving a new line char "\n" hence the scanf(); is...
scanf ("%c", val2); ---> scanf ("\n%c", val2); on line 25
add \n before %c
because you press enter after entering previous number. you are also giving a new line char "\n" hence the...
printf("\nIs there any edge between %d and %d vertices??(y)",i,j);
scanf("\n%c",&ch);//add "\n" in scanf ();
add \n in scan f before %c
access the graphics memory with out operating system.
study about graphic card.