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
1.5k views
1 answer
    I'm trying to figure out why the binaries generated by GCC are so large. Consider this empty program: int main ... consume all of my disk space? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    Can somebody please explain why a while statement like while (ch != ' ' || ch != '' || ch != ' ') { ... } does not work as I expected? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    So, I had an argument with my professor earlier defending that NULL is not a pointer, but he kept on insisting ... so my last resort is here See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    This code snippet hand copied from a book I am reading: /* scmp: string compare of *p1 and *p2 */ int scmp(const void ... v1 = *(char **) p1 ? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I'm compiling the code below and for some reason I can't assign -2147483648 to the variable which is 8 bytes ... please shed some light on this? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    Is there any way to find out the parent directory of a file using C program. I would like to give same ... the file. Any help is appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    unsigned char a, b; b = something(); a = ~b; A static analyzer complained of truncation in the last line, ... this warning in the first place. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I created a simple Hello World C program, compiled it using ndk-build, and transferred it via adb. Essentially I ... . Please help. Thank you. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I am emulating code from an embedded system (stm32, Keil μVision 5, MDK-ARM) on a PC (mingw32, 32bit arch ... How can I correct this behaviour? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Doing cc -std=c99 example.c on the following simplified example.c file: inline void a() { } int main() { a() ... told so, but I have my reasons) See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
2.3k views
1 answer
    I can't find my problem. keeps giving me these errors: "c:2:5: note: expected 'int *' but argument is of ... even_count); 47 . return 0; 48 } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    What will be the output of program #include <stdio.h> int fun(char *a){ printf("%d ",sizeof(a)); return 1; } ... sizeof (fun(a))); return 0; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    There's syscall which allows indirect system calls in Linux. What are the reasons to use it - and why is ... than direct call to the function? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    #include <stdio.h> int foo(){ return 1; } int main(void) { static int q = foo(); return 0; } ... thread with similar query or a good answer. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I'm writing a Linux kernel module, and I'd like to allocate an executable page. Plain kmalloc() returns a pointer ... 2.6.31-20-generic-pae. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    In unqlite c library I found following code: pObj = jx9VmReserveMemObj(&(*pVm),&nIdx); where pVm is: typedef ... (*pVm) equivalent to pVm? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.9k views
1 answer
    I have a nanosecond libpcap (nanosec.pcap) file and the nanosecond timestamp (eg 2.123456789) can be displayed by ... (ts), truncated_hdr); } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    One can use a CRITICAL_SECTION variable to get mutual exclusion. My question is: does CRITICAL_SECTION support ... in the documentation. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    Given an array of type foo_t[n] and a set of n threads, where each of the n threads reads and modifies a ... foo_t is / what alignment it has? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    What is the difference between void *bytes = alloca(size); and char bytes[size]; //Or to be more precise, ... value is unknown at compile-time. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I'm trying to find out where I made invalid writes to a piece of memory using Valgrind. It tells there is ... 0, size); return SPYR_NOERR; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I have this line in my code : t = wait(&status); When the child process works, the value of status is 0, ... int status; t = wait(&status); See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.4k views
1 answer
    I'm learning OpenGL on Fedora 13 and noticed that a call to glGetString is causing a seg fault. I've scraped Google, ... std::endl; return 0; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
983 views
1 answer
    For the the following code: long buf[64]; register long rrax asm ("rax"); register long rrbx asm ("rbx"); ... properly, and how to solve it? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    see in one project source code i have seen belows declaration static int *foo(); so it declare foo as ... of declaring function as static ? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
954 views
1 answer
    The C standard is quite unclear about the uint_fast*_t family of types. On a gcc-4.4.4 linux x86_64 system, the types ... ) to be a 4-byte type? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.3k views
1 answer
    I want to get the carry bit of adding two unsigned 64-bit integers in c. I can use x86-64 asm if needed. code: ... ", res, carry); return 0; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.2k views
1 answer
    I have a simple program (in C) that create two child process, wait on an inherited pipe each, and put the output ... if not, how to debug this)? 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

...