-
Entradas recientes
Blog Stats
- 888.696 hits
Enlaces
Archivos
- enero 2024
- diciembre 2023
- noviembre 2023
- octubre 2023
- septiembre 2023
- May 2023
- enero 2023
- diciembre 2022
- noviembre 2022
- octubre 2022
- febrero 2022
- enero 2022
- diciembre 2021
- noviembre 2021
- octubre 2021
- septiembre 2021
- enero 2021
- diciembre 2020
- noviembre 2020
- octubre 2020
- febrero 2020
- enero 2020
- diciembre 2019
- noviembre 2019
- octubre 2019
- septiembre 2019
- febrero 2019
- enero 2019
- diciembre 2018
- noviembre 2018
- octubre 2018
- septiembre 2018
- febrero 2018
- enero 2018
- diciembre 2017
- noviembre 2017
- septiembre 2017
- febrero 2017
- enero 2017
- diciembre 2016
- noviembre 2016
- septiembre 2016
- febrero 2016
- enero 2016
- diciembre 2015
- noviembre 2015
- octubre 2015
- febrero 2015
- enero 2015
- diciembre 2014
- noviembre 2014
- octubre 2014
- septiembre 2014
- febrero 2014
- enero 2014
- diciembre 2013
- noviembre 2013
- octubre 2013
- septiembre 2013
- febrero 2013
- enero 2013
- diciembre 2012
- noviembre 2012
- octubre 2012
- septiembre 2012
- febrero 2012
- enero 2012
- diciembre 2011
- noviembre 2011
- octubre 2011
- septiembre 2011
- febrero 2011
- enero 2011
- diciembre 2010
- noviembre 2010
- octubre 2010
- septiembre 2010
- julio 2010
- junio 2010
- May 2010
- abril 2010
- marzo 2010
- febrero 2010
- enero 2010
- diciembre 2009
- noviembre 2009
- octubre 2009
- septiembre 2009
- julio 2009
- junio 2009
- May 2009
- abril 2009
- marzo 2009
- febrero 2009
- enero 2009
- diciembre 2008
- noviembre 2008
- octubre 2008
- septiembre 2008
- junio 2008
- May 2008
- abril 2008
- marzo 2008
- febrero 2008
- enero 2008
- diciembre 2007
- noviembre 2007
- octubre 2007
Categorías
Archivo mensual: May 2008
Buscar en un texto ‘palabra’ dada en línea de comandos
Isabel Blanco Muñoz #include <stdio.h>#include <stdlib.h> int main(int argc, char *argv[]){ char *fnombre; FILE *fdescriptor; char *palabra; char c; int i, nveces; if(argc !=3){ printf("uso: %s <nombre del archivo> ", argv[0]); printf("<palabra a buscar>n"); return (0); } … Seguir leyendo
Publicado en programacion
1 Comentario
‘Transmutación de letras’: mayúsculas por minúsculas (y viceversa)
Jorge Martínez // Este programa transfiere un fichero de texto a otro cambiando las minúsculas por mayúsculas.// Vuelve a repetir este proceso pero cambiando las mayúsculas por minúsculas. #include <stdio.h>#include <stdlib.h>#include <ctype.h> // funciones para el manejo de caracteres … Seguir leyendo
Publicado en programacion
2 comentarios
Escribir dos veces un fichero
Jorge Martínez // Este programa escribe dos veces el texto de un fichero, // tanto por pantalla como en otro fichero. #include <stdio.h>#include <stdlib.h> void esc_2veces(FILE *pf);void esc_en_otro(FILE *pf, FILE *pg); int main(){ FILE *pf; FILE *pg; … Seguir leyendo
Publicado en programacion
1 Comentario
Manejo de ficheros binarios
Sergio Velázquez Serrano // Con este programa hacemos lectura y escritura en ficheros binarios #include <stdio.h>#include <stdlib.h>#include <string.h> struct libro{ char titulo[20]; char autor[20]; int ISBN;};typedef struct libro Libro; Libro LibroA={"Anochece en Bagdad","Ismael Abasyufuz",84511252}; int vector1[]={1,5,28,-3,2}; Libro … Seguir leyendo
Publicado en programacion
1 Comentario
Filtro ‘limpiador’ de código HTML
Mª José Bañeres // Programa que limpia el código html de un documento # include <stdio.h># include <stdlib.h> int main(){ FILE *pf, *pg; char nombre1[20]; char nombre2[20]; int c; printf ("Dame el nombre del fichero a … Seguir leyendo
Publicado en programacion
1 Comentario
Fichero «Hola.txt»: manejos básicos
Lidia Lipe Schlieper /* Ejercicios con ficheros: 1. Creamos un fichero "Hola.txt" 2. Escribimos en él 3. Lo sacamos por pantalla 4. Le cambiamos el nombre 5. Lo borramos*/ #include <stdio.h>#include <stdlib.h> int main(){ FILE *pf; char linea[20], nombre[20]; int … Seguir leyendo
Publicado en programacion
1 Comentario
FILTRO DE TEXTO
Mª Pilar Aragó Sancho // Programa que filtra de un fichero de texto cualquier texto con el formato /*….*/ ,// es decir, si el fichero contiene código en C eliminará los comentarios de ese código. #include <stdio.h>#include <stdlib.h> int main( … Seguir leyendo
Publicado en programacion
1 Comentario
Nota publicada en ‘Investigación y Ciencia’, Mayo-2008
Ricardo Os dejo aquí la referencia siguiente: Revista de Divulgación "INVESTIGACION Y CIENCIA",entrega de Mayo de 2008 (núm. 380),sección ‘Ciencia y Sociedad’, pp. 9-11. La podéis encontrar en cualquier kiosko,en el de la Plaza San Francisco mismamente,y vale la pena … Seguir leyendo
Publicado en programacion
Deja un comentario
¿ESTÁN ALINEADOS TRES PUNTOS?
Mª Pilar Aragó Sancho & Isabel Blanco Muñoz #include <stdio.h>#include <stdlib.h>#include <math.h> struct punto{ float x; float y;};typedef struct punto Punto; int alineacion(Punto, Punto, Punto); int main( ){ int alin; Punto p1, p2, p3; printf("Introduzca los valores (x, y) del punto 1n"); scanf("%f %f", &p1.x, … Seguir leyendo
Publicado en programacion
2 comentarios
Cuenta palabras, líneas, caracteres, vocales y letras de un texto
Mª Pilar Aragó Sancho #include <stdio.h>#include <stdlib.h> int main( ){ int l; int nlin = 0; int num_a=0, num_e=0, num_o=0, num_i=0, num_u=0; int nletra = 0; int nchar = 0; int npal = 0; printf("Introduzca el texto finalizada con ‘*’ n"); while((l=getchar())!=’*’) { if(l==’n’) nlin++; … Seguir leyendo
Publicado en programacion
1 Comentario