For example, in the code:
int main() {
int x;
scanf("%d", &x);
printf("%d", x);
}
If I type "A", it automatically converts to integer or just closes the program (the two have already happened to me). there, in the c...
I'm learning programming and I would like to know: how do I make the program read the value of a variable from another program (theoretically this would be without "awareness" of the program read, I do not know exactly how this works, some permi...
The whole numbers positioned in a square NxN such that all lines and main diagonal have the same sum.
For example, the square below
2 7 11
9 5 6
4 3 13
is a mysterious square of sum 20, since all lines (2 + 7 + 11 = 20, 9 +...
How to add from 1 to 64 in while ?
I wanted to make the sum 1+2+3+4+...+64 print the value of the sum by the end.
What I've tried so far:
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
int numero= 1...
I can not solve the following equation:
Hereisthecode:#include<stdio.h>#include<math.h>intmain(){floatm,media,sigma,p;intvetor[10];media=0;m=0;sigma=0;p=0;for(inti=0;i<10;i++){printf("Digite um número: ");
scanf("%d",...
My teacher has posed this problem and I am not able to sort in ascending order just by using a loop to sort.
#include<stdio.h>
main(){
int i,a[5]={1,4,8,9,11},b[5]={3,6,7,10,15},c[10];
for(i=0;i<10;i++){
if(a[i]<...
Personal how do I centralize messages, simple texts?
printf("CLÍNICA DE ANÁLISES LABORATORIAIS\n\n");
printf("TRIAGEM ADMINISTRATIVA\n\n");
These two lines above are within main .
I would like to center them on any console.
I have a problem in C, trying to include the MySQL bookstore gave some strange errors that I did not find anywhere.
I downloaded the bookstore on the official site for Win32-x86 (ZIP) and installed it on MinGW (32-bit , latest version with...
Galera wanted to understand what reason to do these cast below, is it just for aesthetics? What does this really affect in the code?
struct iphdr *ip;
char *buffer
ip = (struct iphdr*) packet;
icmp = (struct icmphdr*) (packet + sizeof(...