365体育足球滚球比分

Dark mode beta

You’ve been asking for dark mode for years.
365体育足球滚球比分 The is finally here.

Change your preferences any time.

Questions tagged [c]

365体育足球滚球比分 C is a general-purpose programming language used for system programming (OS and embedded), libraries, games and cross-platform. This tag should be used with general questions concerning the C language, as defined in the ISO 9899 standard (the latest version, 9899:2018, unless otherwise specified — also tag version-specific requests with c89, c99, c11, etc). C is distinct from C++ and it should not be combined with the C++ tag absent a rational reason.

Filter by
Sorted by
Tagged with
1
vote
0answers
13 views

Learn C the Hard Way's ex17 database design issues

I'm really stuck on this one. ex17 is supposed to be teaching me heap and stack memory allocation by providing a simple database (my questions are specifie, but i'll leave it there just in case you ...
0
votes
1answer
23 views

Char array in multiple test cases

#include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> #define SIZE 100 char stack[SIZE]; int top = -1; void push(char item) { if(top >= ...
-1
votes
0answers
19 views

Create an array with rand() [closed]

So my task is to create an array with rand() function. Every time this program runs, asks the size of the array, and how much is the frequency of the 0 that will input in the array. For example on ...
0
votes
0answers
12 views

MPFR giving NaN answer when all inputs are correct

I have a small program written in C that uses MFPR and GMP to compute Pi to lots of decimal places using the Chudnovsky algorithm. Here is the code: #include <stdio.h> #include <gmp.h> #...
0
votes
0answers
27 views

C arrays with Pointers [closed]

This is my code. What was the wrong ? It has not worked properly and given the true result to me ? What should I do to solve it ? It should work like this; There is an array and It was generated ...
0
votes
2answers
27 views

How to allocate dynamic memory in a dynamic structure variable?

I want to allocate some memory to one of the members of a dynamic structure, dynamically. But I don't know what do I do and also, i don't know how to use them after allocating. This is my code work : ...
2
votes
2answers
36 views

Clear just bit field members of a struct?

I have a struct like the following: struct Foo { unsigned int id; unsigned int flag_1 : 1; unsigned int flag_2 : 1; unsigned int flag_3 : 1; // Some arbitrary number of further ...
0
votes
0answers
33 views

Use mmap to put content into an allocated memory region

I have tried to read documentation on mmap but I am still having a hard time understanding how to use it. I want to take an argument from the command line and then allocate it to an executable ...
1
vote
1answer
16 views

`strtoul()` What is the correct return value for very “negative” stirngs?

This is a It’s OK to Ask and Answer Your Own Questions. I researched the issue, found the result curious, and posted my findings. What value should "very negative" strings return from strtoul(): -1, ...
0
votes
0answers
20 views

Why this random not random in PIC simulator ide

i used PIC simulator ide with PIC16f886 and random is always equal to 0 everytime i run the code.it look like the rand() is not working i cant understand what happened Here is code #include <...
3
votes
3answers
41 views

Unexpected behaviour when using sizeof operator [duplicate]

#include <stdio.h> #include <stdlib.h> typedef struct StupidAssignment{ long length; char* destination_ip; char* destination_port; long timestamp; long uid; char* ...
-2
votes
1answer
29 views

how to access variables from struct in the main function

So I wanna create an agenda for numbers and names and all that. #include <stdio.h> #include <stdlib.h> struct Agenda { char name[20]; char last_name[20]; int number[11]; ...
2
votes
2answers
32 views

Initialize the iterator variable in for loop in C

I'm sorry if it may be a stupid question. Last time, my friend told me that i should declare the iterator variable in the outside of the for loop when i develop on the embedded system, for example: ...
1
vote
1answer
46 views

How does C work when int is converted to float?

I'm curious, if we have a 32bit pattern of 1111 1111 1000 0000 0000 0000 0000 0000 which is -2^23 in int, when we convert int to float will this be -INF?
0
votes
2answers
26 views

How to makefile in c programm with input txt file from another directory

Im trying to create a makefile that executes with input from a txt file in different directory. My direcotry goes like this: project/misc/input.txt project/programms/findlines.c My makefile so far ...

15 30 50 per page
1
2 3 4 5
21673