I want to write a C file + get correct diagnostics and tree-sitter syntax highlighting in neovim. Everything works fine, unless I include an external library (i
I'm attempting to do basic file reading in C with fgets. It should read one line, pass it to the tokeniser function which should split it at every ' ' and add
My box runs Ubuntu 21.10. I use GTK4, C-language and XML description of the GUI. I am new to GUIs in general, and to GTK4 in particular. The program uses a GtkF
For my studies, I have to write a C function GetEvenNumber: parameters: array with n integers + array size; returns tr array which contains even integers from t
I have a simple file reading algorithm but it's not returning the values that are in the file. The below is the code. The input txt values are 200 53 65 98 183
Project structure: enter image description here When starting the makefile, I get an error: src/main.c:1:10: fatal error: lib/hello.h: No such file or directory
why there is no "*" in output? the input is : abcde[enter key] #include<stdio.h> int main(void){ char ch; while ((ch=getchar( ))== 'e') pr
The question is pretty much in the title. The code void modify_str(char* str){ if(strlen(str) > 5) { str[5] = 'x'; } } Will invoke undef
FILE* inp; inp = fopen("wordlist.txt","r"); //filename of your data file char arr[100][5]; //max word length 5 int i = 0; while(1){ char r
NEC2 was originally written in Fortran and there have been two different ports to C from the original Fortran (xnec2c and necpp). The variable and function name
I'm trying to write a program that uses Caesar's algorithm to cipher a string input. I'm a beginner to C but I can understand basic codes. So to cipher the text
The following program checks if a signal is pending. I use the sigpending function to return blocked (or waiting) signals. The problem is that I don't want this
I'm new to C, and in order to practice I found a task on the Internet: Write C code that has functions that can: (1) Create a linear table; (2) Input data elem
I wrote the following code based of off Confusion about different clobber description for arm inline assembly and it works fine: #include <
I have the following code #include <stdio.h> //#define arraySize 5 #define arraySize 500 void func(double B[arraySize][arraySize]) { B[0][0] = 5; } i
While I practice C,I developed sample insertion sort in C. after some search and refer some materials ,I wrote following one. After that,I build and run. gcc in
#include <stdio.h> #include <stdlib.h> #include <string.h> struct charact { char ch; int occurs; struct charact *next; }; typedef
Let k be a positive integer. Is it possible to find out the value of 3^k in mod 1000000007? I have written a C program code to do this but it gives a message on
i want to read from the file using fgets and send the information to struct in array so i write this code but the output in incorrect this is the file i tried t
I have a string that I want to execute in C file and I'd like to get the string from standard input. echo "Here is some random text.\n" | ./ma