Questions tagged as 'c'

1
answer

Help how to pass everything to Text in C [closed]

The code creates nodes and saves them in a file .bin and at the end saves them and when I return it opens it recovers what the binary file already has. All this is done with the "int" or a number. What I want is that instead of...
asked by 13.04.2017 / 03:29
3
answers

Problem with local and global variable exercise in C [closed]

I did the following exercise as it appears in a book: /*4_3.c en prueba*/ #include<stdio.h> int k=5; /*variable global*/ void main(void){ void f1(void); /*prototipo de función*/ int i; for(i=1;i<=3;i++){ f1(); } } void f1(void...
asked by 21.10.2016 / 11:37
1
answer

Help for a C program [closed]

Hi, I just wrote a C program as a university internship which must calculate the cosine of a number through the Taylor series. The problem is that the program compiles perfectly but at the time of executing it it stops right after the second sca...
asked by 24.03.2017 / 19:59
2
answers

Recursivity in C

I honestly do not understand why this code does not work, if someone can give me a hand, it has very few lines; the slogan is a vector, where the sequence has to be strictly increasing , that is, an array: 3, 5, 7 - > meets the condition; a...
asked by 06.04.2016 / 11:35
2
answers

in the loop my gets_s is skipped in the second iteration

I am asking for the note and the names of 10 students but when it enters the second iteration of the for the gets_s it is skipped, do not let me enter the student's name. #include <string.h> #include <conio.h> #include <stdio.h&...
asked by 14.10.2018 / 21:27
3
answers

display the index number of a vector

I want to show the index number in which certain information is positioned in a vector. I made a for to calculate which is the person who has the least amount of children and how many are. Once I get the least amount of children, I want to say w...
asked by 18.08.2016 / 03:56
2
answers

warning: passing argument 1 of 'HashInsertar' from incompatible pointer type

I have this program that should implement a hasheo function. But throw the following warning that is above: warning: passing argument 1 of 'HashInsertar' from incompatible pointer type When you try to pass the number entered by the user t...
asked by 28.08.2018 / 23:25
3
answers

Validate a type of data when reading it in C

I would like to know the best and most efficient way to read a type of data and if you type anything else that does not pass from there, until you type the type of data that I am asking for. Example: int numero; printf("Digite un numero: ")...
asked by 08.05.2018 / 03:12
3
answers

what is the int opc for? in c ++? [closed]

#include <conio.h> #include <stdio.h> int main( ) { int opc; // <- porque el termino opc? printf( "\n Por favor introduzca un numero del 1 al 7 considerando 1 como lunes " ); scanf( "%d", &opc ); switch( opc ) { ca...
asked by 05.11.2017 / 02:31
1
answer

Access elements of a matrix through pointer arithmetic

How can I access the elements of an integer array using pointer arithmetic? I am clear that to access those of a vector is such that *(vector+"posicion") but for a matrix I do not know how I can do it. I know that they can be writte...
asked by 15.06.2017 / 11:08