I am trying to write a program in C (for xv6) that returns the last "n" number of lines of input text or a file (essentially tail) with the exception that it sh
vscode default c syntax checker seems that c standard used not high (maybe c99 or lower) like the example following: array ellipsis is available in c11 , actua
I have been stuck on CS50 Filter - Edges for a few days now, having a hard time determining what's wrong with my code. This code returns an almost all white ima
I already know that there is no way to know if a pointer target still a valid allocation of it's already freed, so I'm trying to use pointer to pointer to solve
I have this almost solved. I've found this function: void webkit_web_view_save_to_file (WebKitWebView *web_view, GFile *file,
I am trying to send a notification message from a kernel module to user space application using netlink sockets interface and custom netlink protocol. My unders
What do I want to do? I'm working on a project on dynamic matrix multiplication. I want to input from the user that on how many matrices, he/she wants to perfor
cannot cast 'float64' to different essential type 'unsigned16' [MISRA 2012 Rule 10.8, required] double x, y; #define MIN 2.0 uint16_t z = (uint16_t) ((x * MIN)
This program creates a pid and shares two integers (base and height) through the shared memory. The parent process time asks four times to insert two integers a
I've tryed to print out some array of strings but faced error: excess elements in char array initializer Please make a hint what's worng with this code? Step 1
#include<stdio.h> void add(int a,int b) { int c=a+b; printf("\nSum=%d",c); } void hello(char *name) { printf("Hello %s",*name); } int main() {
I am practicing binary search with problem 704 on leetcode. At first, I just follow the concept of binary search and came up with this solution: int search(int*
int fun1(int x){ static int n; n = 0; if(x > 0){ n++; return fun1(x-1)+n; } return 0; } int fun(int x){
For example this code is broken (I've just fixed it in actual code..). uint64_t a = 1 << 60 It can be fixed as, uint64_t a = (uint64_t)1 << 60 but
Have some troubles in compiling from source https://github.com/greenbone/openvas.git cmake was done successfully, but make failed with: /usr/bin/ld: /opt/gvm/li
I have this Code that I can't understand. I understood the basics of fork() but I don't understand the Hierarchical tree for this process. The code is like this
This is the code how I am reading the response from my HTTPS request: int len = 0; f = fopen("response.txt", "wb"); do { char buff[1534]; len = BIO_read
Why is it when I try to take in a text in the variable is does not store in the full sentence. The malloc seems to not allocate enough memory
The program shows output for all other characters instead of space. When I enter "space" it doesn't do anything and just waits. #include<stdio.h> #include
My home world is to write a shell. and I must use $PS2. but when I write a code like this: char *ENV_ps2; ENV_ps2 = getenv("PS2"); I just found ENV_ps2 was