from 4 years ago... I was using this function to get the contents of a file as a char array. The length of file is saved into "len" variable. and the function returns to the charr array pointer.
...
Type: Posts; User: rac1
from 4 years ago... I was using this function to get the contents of a file as a char array. The length of file is saved into "len" variable. and the function returns to the charr array pointer.
...
if you are using Case statements in a loop in the visual studio 6; the scanf has problem. Dont use Case, use if elseif else instead of case. When i was learning C programming language at school, same...
I dont know why are all the members discussing on a simple thing.
Dear friend, you should put (float) infront of integer variable.
#include <stdio.h>
int main ()
{
int weight;
int height;...
no need for recursion
for i=0 to 5
5*6/2= 15 =1+2+3+4+5
sum of all i = n*(n+1)/2
sum of all i *2 = n*(n+1)
No, it really works great.For example when i open the game, it use 300 mb memory,
max memory is 512 i have.
When i use my program, i can see in taskmgr, it is getting lower.The memory usage of game...
@adeyblue
actually , i wanted to make an exe , in exe.in the other words, i would like to create an exe, which contains another exes in main exe, but i didnt.After i tried to find where is exe and...
i searched a lot, i didnt find anything about how to find the used memory in megabytes in realtime.
after i did this program.My real aim was, combinening all of options or programs in one exe.I...
if it works no problem doesn't it?
yes works...
Use one mor gets at the and of the loop
for example i use always this
char error[50];
char surname[25];
char name[20];
int id;
while(1) //this is an example
Hi
i want to learn how can i find the memory usage of my computer.
For example, my ram is 512mb, when i play game, it sometimes fullfilled and my pc shut down otomaticly.I found a program which is...
thanks i solved myself :D
char x=37;
printf("%c",x);
==== % :D
hi,
i searched c display percentage in google but didnt find anything,
printf("Pleams enter the sand fraction content (0.05-2.00 mm diameter) [%];");
after execute, '%' doesnt seem in the...
hi,
you want to read a file but you didnt opened a file, you didnt closed it and you didnt read this file with codes such as fgets,fgetc,fscanf
please look at file reading topics.
EOF means End of...
fgets only takes the first line, you dont know how many lines are there in the text so i think you should write your own fgets function to do better operations.
Not:before calling this function; you...
you are master of
<stdlib.h> and
<string.h> . Thank you all.Your code looks like pretty,awesome, i handle with how it is works,because i dont know the stdlib codes.I write this strncpy,strlen...
this program is finding the dividers of an integer, i hope you can understand it and change it to N!^2
#include <stdio.h>
int p(int asal)
i wrote this, it looks like good :D
my wrote things are coded by asciicode -1
after decode i add +1 and it will be decoded.
The algoritm can be improve.
:cool:
#include <stdio.h>
Thanks MK27,
I am searching your link now, but it looks like complicated, i am a low level programmer.
but i am dealing with the understanding what is the idea in your link.
Hi,
i get an idea, for example i want to save my important informations in a file, (i could do this making an exe and a password option to see the content of program but i dont want it) but i also...
i think,he is annoying with us
there is one space in the code.
Thanks for helping Jim and Whiteflags.
you are right.I understood that i must use feof or eof to save the file content onto an array.But in here as you see, if i used fgets, i shouldn't allocate my...
Could you try this code?
if the 2222 was the garbages of the memory,yes you are right and it is not the symbol of the end of file,
while you trying on your machine, if it gives same result, i can...
i ordered my code , and made new one , could you look my previous post please?
That is the code and look the output.I think i found what is the end of file :)
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
thanks Jim;
you want to tell me this isn't it?
content=(char *)calloc(1000,sizeof(char));
but i dont know
content=calloc(1000,sizeof(char)); is also work with the above code.
okey i should use...