Thanks all for suggestions..:) i got the answer.... and from the next time i will be specific in asking quesitons....that should be better....:)
Type: Posts; User: compile
Thanks all for suggestions..:) i got the answer.... and from the next time i will be specific in asking quesitons....that should be better....:)
:) thanks a lot for that link nadroj... that really helped me.....
i really agree with what u are saying...and i have not even asked to give the ready code for something...the first thing what i...
thanks a lot for reply salem.....:)
but really i didnt get what u are saying.... sorry...
can u plese be more detail...
Hi friends,
i have a doubt... can i redirect the output printed on the console to a variable in C program ?? (Eg: say i am using linux OS coding in C and inside the C code i have used system("date")...
int getmacaddress(char* dev, unsigned char *ipmac);
int main()
{
int mac;
unsigned char dot_not_mac[25];
mac=getmacaddress("eth0",dot_not_mac);
printf(" the MAC address is...
oh.. thanks robatino...i got it... :)
wow... thanks vart :) i wonder how u guys got these tricks and knowledge in C...
thanks a lot for that link... :)
sorry robatino i didnt get what u are telling....
Hi friends.
this is my code
#include<stdio.h>
#include<string.h>
int main()
{
char buf[4]={'5','a','4','b'};
int i;
Thanks vart, :) i wil do further....
Thanks for the replies....
i didnt get .. sorry... :( how to read the file into memory.... what it means...
what about the maximum limit u are telling.... say for 15K which one u prefer.....
Hi kennedy,
when i dunno the position(where the string is located in the file) of the string how can i fseek ??? :( and moreover to point to the position of the substring strstr() makes a local...
wow...thanks Kennedy, :)
i will try coding that and will come back if i find some doubts.....
oh.. fine.. but why cant we search and replace directly in a file itself ???
thanks....
but one more doubt struck my mind..... say i have a very large text file.... and i want to search a string and replace there.... without making one more copy of the file.. how to do this......
wow thannks ssharish2005,
thanks a lot..... :) :)
Hi friends once again some clarifications....
in the above program.... if the search string is say "gram" and if that string is not there but if there is a string "program" then it says the string...
Thanks vart,
and thanks kennedy too....:)
kennedy this is not a home work... and i am a professional in electronics and communications... but i am a begginer in "C"... thats y asking help with u...
Thanks vart,
i have already done the same thing.... but i am not able to get how to replace the string..... i have used fgets() and strstr()... can u please gimme a simple code for this...:)
Hi all,
i have a problem.. i want to search a string say "abc" from a file and replace this string with say "xyz" can anyone help me to do this....please gimme some tips or sample codes......
oh.. superb.. thanks a lot swoopy... i will come back if i have some more doubts...
thanks again.. :) :)
ohh.. ohh.... thats really great friends.... i am really in the right place to learn C... thanks a lot for all the replies..... :) :) :) i will make my problem more specific....i have a file format...
Hi all,
i am new to this forum and i am a C beginner... can anyone tell me that how can i read 2 bytes from a file and have that in a single variable...???