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
413 views
1 answer
    How can i access s[7] in s? I didn't observe any difference between strncpy and memcpy. If I want to print ... /* O/P qwerty qwerty qwerty */ See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
367 views
1 answer
    Suppose I have a constant defined in a header file #define THIS_CONST 'A' I want to write this constant to a ... const variable in a case label? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
358 views
1 answer
    My questions aims at the behaviour of setjmp/longjmp concerning local variables. Example code: jmp_buf env; void abc ... compiler doesn't help. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
553 views
1 answer
    I'm going though a computers system course and I'm trying to establish, for sure, if my AMD based computer ... Linux desktop be little endian? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
478 views
1 answer
    Is there a version of memset() which sets a value that is larger than 1 byte (char)? For example, let's ... memset(). Know anything like that? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
497 views
1 answer
    I am debugging a program in gdb and I want the program to stop when the memory region 0x08049000 to ... watch the whole memory region? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
301 views
1 answer
    As I understand it, the C specification says that type int is supposed to be the most efficient type on ... it just demonstrates the point) See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
294 views
1 answer
    This might be a stupid question, but is it possible to assign some values to an array instead of all? To clarify what I want ... 1, 4: 2, 8: 3}; See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
458 views
1 answer
    I have a program that maps quite a few (100's) of sizable files 10-100MB each. I need them all mapped at ... terribly clear to me on this one. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
315 views
1 answer
    I'd like to know the maximum value of size_t on the system my program is running. My first instinct was ... , or a constant defined somewhere. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
449 views
1 answer
    I have a question about Pre-processor directives in c++: For example: #ifndef QUESTION //some code here #ifndef ... endif in the right way? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
608 views
1 answer
    Even after casting a void pointer, I am getting compilation error while dereferencing it. Could anyone please let me know ... %d ",lVptr[1]); See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
343 views
1 answer
    I have the following piece of extremely simple code, which is supposed to output (amongst other things), three ... parts of the unicode space? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
459 views
1 answer
    I have the following function : void getdata(int arr[], int n) { for (int i = 0; i < n; i++) { int a ... what is wrong.Why do I get this error? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
547 views
1 answer
    I need some way for the parent process to communicate with each child separately. I have some children that ... help is appreciated. Thank you See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
248 views
1 answer
    I want to have a user enter numbers separated by a space and then store each value as an element of an ... I be using scanf instead somehow? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
344 views
1 answer
    How can I tell if a read socket buffer is full or a write socket buffer is empty? Is there a way I can get ... Not when it is full (I think). See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
399 views
1 answer
    In the C language, how do I convert unsigned long value to a string (char *) and keep my source ... of buffer with platform-independent manner? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
315 views
1 answer
    I have tried implementing the sizeof operator. I have done in this way: #define my_sizeof(x) ((&x + 1) - ... how is it working if typecasted? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
332 views
1 answer
    It seems that Python 2.6.1 doesn't compile bz2 library by default from source. I don't have lib-dynload/bz2. ... IIRC I used only --prefix flag. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
278 views
1 answer
    In C, is there a nice way to track the number of elements in an enum? I've seen enum blah { FIRST, ... items are sequential and start at zero. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
583 views
1 answer
    Say you have this code pthread_mutex_lock(&cam->video_lock); while(cam->status == WAIT_DISPLAY) // <-- Why ... cam_video_lock. Am I right? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    I am reading the Google Go tutorial and saw this in the constants section: There are no constants like 0LL ... possible in a hexadecimal number. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
331 views
1 answer
    Why does the following code in C work? const char* str = NULL; str = "test"; str = "test2"; Since str ... this is a legacy issue with C? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
497 views
1 answer
    I want to generate (pseudo) random numbers between 0 and some integer. I don't mind if they aren't too random. ... or something? I am using c. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
437 views
1 answer
    What's the difference between using the functions fgetpos() and fsetpos() and using the functions ftell() and fseek() ... ftell() and fseek()? See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
423 views
1 answer
    Here is a program I'm trying to run straight from section 1.9 of "The C Programming Language". #include ... any advice on this issue. See Question&Answers more detail:os...
asked Oct 17, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
351 views
1 answer
    Consider: void foo1(char **p) { *p++; } void foo2(char **p) { *p += 1; } and char *s = "abcd"; char ... ("%s", a); //bcd Can someone explain it? See Question&Answers more detail:os...
asked Oct 17, 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

...