Welcome to Jonic Developer 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
197 views
0 answers
    I NEED A JOB. GIVE MEE NOW OR ME WILL GET SADS...
asked May 27 in Jobs[工作] by 与恶龙缠斗过久,自身亦成为 (100 points)
0 votes
414 views
1 answer
    Given an array I am required to sort it in such a way that the first element is the smallest value, the second element is the largest, the third element is the second ... ; temp = m; m = n; n = temp; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
239 views
1 answer
    I am writing a little snake game in C, using SDL, on Windows. On each frame I move each square a constant amount of pixels (e.g. 2 pixels). ... .type == SDL_QUIT) return QUIT; } return NONE; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
420 views
1 answer
    I`ve tried to implement dot product of this two arrays using AVX https://stackoverflow.com/a/10459028. But my code is very slow. A and xb are arrays of ... m128d_f64[0]+dotproduct.m128d_f64[1]; i += 3; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
318 views
1 answer
    As was suggested in an answer to my last question (How do I send an array of integers over TCP in C?), I tried to send an array of long int, ... this didn't work either (the read function returned -1). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
280 views
1 answer
    I was trying to learn something about parallel programming, so I tried to implement Peterson's algorithm for an easy example where one shared counter is ... %d ", counter); return (EXIT_SUCCESS); } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
330 views
1 answer
    I am writing a simple C program that tosses a coin 100000 times and calculates how many heads and how many tails resulted from the toss using srand and ... heads 50% tails. Am I missing something? Thanks! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
562 views
1 answer
    I have old code that was written to link against an old version of openssl. Part of this code loads a key from a PEM file, and tries to ... having a hard time figuring out which function that is. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
418 views
1 answer
    Suppose I have some C program like this: #include <stdlib.h> #include <stdbool.h> int main() { while (true) { void *p = malloc(1000); free(p); ... (I only can execute commands inside gdb with -ex option). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
419 views
1 answer
    I'm trying to write OpenMP solution for Insertion sort but I'm having problems to make it run in parallel and give correct results :). Is there any way ... // cas = (double)(stop-start)/CLOCKS_PER_SEC; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
383 views
1 answer
    I was looking at the program at http://www0.us.ioccc.org/1988/westley.c, mentioned in another SO answer - it's supposed to print the value ... prevent those spaces from showing up would be appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
339 views
1 answer
    I want to get a function that will set the n last bits of a numerical type to 1. For example: bitmask (5) = 0b11111 = 31 bitmask (0) = 0 I, ... 1s... What is the proper way to achieve this function ? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
292 views
1 answer
    When declaring variables in C you can omit the type sometimes if you want to declare an int. Why does omitting explicit 'int' type for a parameter fail to ... , I don't generally write this old-style C. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
315 views
1 answer
    I have two binary files and I want to compare them Byte by Byte. I came up with the following code to do so: int CompareFiles(char *pFname1, char *pFname2 ... for loop. Why so? What am I doing wrong here? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
355 views
1 answer
    I'm trying to hot patch an exe in memory, the source is available but I'm doing this for learning purposes. (so please no comments suggesting i ... is the way I'm overwriting the original instructions. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
267 views
1 answer
    In section 2.5.3 "Broadcasts" of the Intel Architecture Instruction Set Extensions Programming Reference the we learn than AVX512 (and Knights Corner) has a ... broadcast memory operand if b is in memory. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
390 views
1 answer
    I have the following situation: There is a thread that reads from a device with a fread call. This call is blocking as long as there is no data send ... the entire application, but that's not what I want. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
309 views
1 answer
    I saw some C code like this: int check = 10: switch(check) { case 1...9: printf("It is 2 to 9");break; case 10: printf("It is 10");break; } What does this case 1...9: mean? Is it standard? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
310 views
1 answer
    #include<stdio.h> main() { unsigned int num; printf("enter the number: "); scanf("%u",&num);//4294967299 if i'm scanning more than 4G its not scanning ... via scanf(), why is it following in case of char? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
346 views
1 answer
    I keep passing in and returning the dirs_later_array. When I get to "new_size=..." in the else block, I end up with new_size of 2 the second time ... [new_size - 1] = new_dir; } return dirs_later_array; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
361 views
1 answer
    I'm trying to determine what parameters of a sending operation and receiving operation must match for a message to be passed. I understand that a receiving ... I am aware is valid for MPI. Thanks. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
552 views
1 answer
    What does this warning mean (i and j are not constants): I have been trying to Google this but it does not give me any results. warning: comparison ... and j are not constant values and they do change. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
398 views
1 answer
    On a character input in the first scanf(), the second one doesn't run. getchar() isn't working either for Try Again input. It skips to take input for Would you like to ... = 'y' || ch == 'Y'); return 0; } See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
271 views
1 answer
    I am having a problem with VS2010 (and VS2008) giving my a great list of syntax errors. However, the syntax is indeed correct. Here is a small ... it looks correct. Any help would be appreciated. Thanks! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
286 views
1 answer
    Below are three threading models that i came across. Based on these below 3 architectures, It is new for me to understand that, there also exist ... get scheduled by OS scheduler but not user thread? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
262 views
1 answer
    I am using PortAudio to implement a real-time audio processing. My primary task is to acquire data from mic continuously and provide 100 samples for ... be really useful here. Your help is appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
412 views
1 answer
    I am running a C program using GCC and a proprietary DSP cross-compiler to simulate some functioality. I am using the following code to measure ... CPU causing the error is measuring the CLOCKS_PER_SEC. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
302 views
1 answer
    If I compile this program: #include <stdio.h> int main(int argc, char** argv) { printf("hello world! "); return 0; } for x86-64, the asm ... at any arbitrary address I choose (above 2^32 potentially). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
...