The following code:
#include <stdio.h>
void main()
{
int num = 123;
printf("O valor de num = %d e o valor seguinte = %c", num, num+1);
}
Returns the following result in the Cloud9 terminal:
The value of num = 123 and th...
When compiling my discarded media program, the following error occurs. Remembering that I used MIN to discard the smallest value between a, b, c and d.
My program.c :( .text + 0x8b): undefined reference to 'MIN'
[Error] ld returne...
I have the following code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
float a, b, c, delt, c0, c1, c2;
char s;
int op = 1;
printf("Welcome.\n\n");
while (op == 1) {
pri...
Is it possible to use Polymorphism in a structured language like C ?
Languages like c++ , Java , etc (Object-oriented languages), have structures capable of inheriting functionality for code reuse (One of the reasons),...
Could someone answer me because in cpf is printing the value 6422276?
#include<stdio.h>
#include<stdlib.h>
typedef struct{
int dia;
int mes;
int ano;
}data;
typedef struct{
char nome[100];
data nascimento;
int cpf[10];
}ficha;
f...
Suppose the elements of the v vector are of type int and each int occupies 8 bytes on your computer.
If the address of v[0] is 55000, what is the value of the expression v + 3 ?
In reading the variable at the end to display the value, it displays a garbage, here is the statement along with my code.
Make a program that recognizes the age, height, and weight of five people, compute and show:
The number of pe...
I make the sum of two numbers 5 and 5, how to pass the result (10) as follows : vetor[0]=1 and vetor[1]=0 , ie separate result for each position of my vector, without the vetor[0] receiving the full value that would be ve...
I have a problem with my temperature measuring function.
#include "max6675.h"
int ktcSO = 8;
int ktcCS = 9;
int ktcCLK = 10;
MAX6675 ktc(ktcCLK, ktcCS, ktcSO);
void setup()
{
Serial.begin(9600);
delay(500);
}
void loop()
{
Serial...
I can not use the?:
#include <stdio.h>
int main()
{
int num1 = 10;
int num2 = 20;
int resposta;
num1 < num2 ? printf("sim\n") : printf("nao\n");
// O erro acontece aqui ao compilar
num1 < num2 ? resposta = 10 : respost...