Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
It is easy
you would charge file to RAM (array, count the line of file for array size), after you change the value, you would write the file again.
int line_count(FILE *fp)
{
int count=0;
char letra;
letra=getc(fp);
while(!feof(fp))
{
if(letra=='\n')
{
count++;
}...
I think that : Santoku-linux can help too, Santoku includes a number of open source tools dedicated to helping you in every aspect of your mobile forensics, malware analysis, and security testing needs. You can decompile application to learn.
Enjoy
This is the function:
input: string (texto)
ouput: int
int deBinario(char * texto){
int longitud = strlen(texto);
int valorMenosSignificativo = texto[longitud - 1] - '0';
texto[longitud - 1] = 0;
if (longitud == 1)
return valorMenosSignificativo;
else
return...
A structure is a collection of one or more variables, possibly of different data types... Array has same data type.
To copy structure content into another structure is easy
a=b;
In arrays "for" is mandatory for copy (memset is possible).
Enjoy
Use strtok() for example
#include <string.h>
...
char *token;
char *line = "LINE TO BE SEPARATED";
char *search = " ";
/* Token will point to "LINE". */
token = strtok(line, search);
/* Token will point to "TO". */
token = strtok(NULL, search);
enjoy
You can make a script using the ping command and run it every minute scheduled in the crontab to see if internet failure.
ping -c4 router | grep 'received' | awk -F',' '{ print $2}' | awk '{ print $1}'
where router is router ip. For example.
ping -c4 192.168.1.1 | grep 'received' | awk -F','...
false mode w
w Create for writing. If a file by that name already exists, it will be overwritten.
is better
FILE *fp;
fp=fopen("filename.txt","r+"); //Open an existing file for update (reading and writing).
if(fp==NULL) //If a file by that name NO...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.