Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged C

0 votes
746 views
1 answer
    I have a query based on the below program - char ch; ch = 'z'; while(ch >= 'a') { printf("char is ... form, then who actually does it and how ? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
771 views
1 answer
    I am writing a C (shared) library. It started out as a single translation unit, in which I could ... multiple, specific translation units? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
803 views
1 answer
    what does the error message "Lvalue required" actually mean? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
708 views
1 answer
    I want to print the maximum value of the unsigned integer which is of 4 bytes. #include "stdafx.h" #include " ... can I print x = 4294967295? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
752 views
1 answer
    On the MSVC++ compiler, one can use the __int8, __int16, __int32 and similar types for integers with specific ... use on the GCC compiler? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
769 views
1 answer
    From what I understand because malloc dynamically assigns mem , you need to free that mem so that it can be used again ... yes , some say no). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
771 views
1 answer
    Two separate questions here really: Can I use regexes in a multithreaded program without locking and, if so, can ... on Google or the manpages. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
627 views
1 answer
    Let us say that I declare and initialize int a[3] = {1, 2, 3}; How can I later asisgn the entire array in one fell swoop? i.e. a = {3, 2, 1}; See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
835 views
1 answer
    I don't have access to the C11 specification, therefore I can't investigate this bug. The following ... : expected expression before : See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
696 views
1 answer
    Suppose I have the following structure: typedef struct { unsigned field1 :1; unsigned field2 :1; unsigned field3 :1 ... Fields have bits set "); See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
711 views
1 answer
    Using VS2013 Update 2, I've stumbled on some strange error message : // test.c int main(void) { struct ... compile error in Visual Studio 2013 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
958 views
1 answer
    I'm trying to retrieve the coordinates of cursor in a VT100 terminal using the following code: void getCursor(int* ... anybody know what it is? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
771 views
1 answer
    The code below returns an address when executed in Windows, though I was expecting it to return NULL. int main() ... used for anything at all? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
675 views
1 answer
    In case of Linux, for time functions we have a _r versions Ex: localtime has localtime_r, but in ... time functions inherently thread-safe? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
779 views
1 answer
    I was looking the implementation of memcpy.c, I found a different memcpy code. I couldnt understand why do they ... /* ! __MACHDEP_MEMFUNC */ See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
814 views
1 answer
    I'm working on a linux C project and I'm having trouble working with file descriptors. I have an orphan file ... --- Thanks in advance! -Andrew See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
710 views
1 answer
    When I compiled the following code with gcc -Wall -pedantic -ansi -std=c89, it compiled successfully without giving an ... and has a use case? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
699 views
1 answer
    Suppose long long b = 5*1024*1024*1024; // 5 gigs, small enough for 64 bits printf ("%lu ",sizeof(long ... does it overflow, what am I missing? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
692 views
1 answer
    This is a general question. For example, currently two child threads have called pthread_cond_wait(&cond1,&mutex), and they ... twice in a row? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
893 views
1 answer
    This was part of a larger programming assignment that was due for me last night. Couldn't figure out this ... return value should be 0x80000000. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
697 views
1 answer
    I have heard that pointers should first be cast to void to ensure consistency of values across different platforms and ... %p",(void*)pi); See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
677 views
1 answer
    Is it a good idea to use IEEE754 floating point NaN (not-a-number) for values which are undefined for non- ... we should pick some other value? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
803 views
1 answer
    Is there any point to freeing memory in an atexit() function? I have a global variable that gets malloc'ed ... actively cleaning it up myself? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
746 views
1 answer
    In my client code, I am following these steps to connect to a socket: Creating a socket sockDesc = socket( ... and connect() is successful. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
613 views
1 answer
    I'm looking for a lightweight way to make my program (written in C) be able to play audio files on ... Single channel, 22Khz Any Suggestions? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
568 views
1 answer
    The C spec has an interesting footnote (#268 C11dr §7.21.3 9) "Setting the file position indicator to ... trailing null characters)" comment. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
749 views
1 answer
    I was running the program #include<stdio.h> #include <unistd.h> main() { pid_t pid, ppid; printf("Hello World1 ... 1 It should have been 3071? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
860 views
1 answer
    In my class we are writing our own copy of C's malloc() function. To test my code (which can currently ... ", char*) stop printing chars? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...