C Programming | Reddit
0 FOLLOWERS
This sub-reddit is for the discussion of C programming language, related news, useful tips for beginners and ask question about anything related to the programming language.
C Programming | Reddit
3h ago
I'm looking for an IDE.
What I really need from an IDE:
Capable of reading in included libraries (maybe with cmake). Capable of reading headers of function (even from included libraries) and suggesting and visualising it when I write the function.
Capable of autocomplete suggestion based ONLY on variable I defined in the scope. No strange vsc stuff I need each time to dismiss with esc or die trying to use arrows to move one.
Capable of autocomplete function name based on all the possible functions defined in the libraries I included.
Capable of syncing on github. Capable of having various col ..read more
C Programming | Reddit
3h ago
I am working on an assignment and am having a horribel time trying to get my linked list to not put the one set into EVERY single node and overwrite the set in the others before it.
submitted by /u/Extension-Pickle5421
[visit reddit] [comments ..read more
C Programming | Reddit
8h ago
My c programming exam in on a online platform, there is a compiler, I want to find all hidden test cases for that question so that i print expected output.
submitted by /u/pussykiller486
[visit reddit] [comments ..read more
C Programming | Reddit
8h ago
can someone help me find some good c pointer to functions exercises with solutions? so i can better grasp them.
thank you.
edit:
other than qsort on k&r or man pages, thank you
submitted by /u/Active_Ad_3448
[visit reddit] [comments ..read more
C Programming | Reddit
8h ago
I'm doing some review problems for my next test and I'm trying to store some ints from a file to an int array but a random 7 digit value is getting stored in all the array slots when I print it out. I've tried looking for a fix but can't find any results online.
#include <stdlib.h> int main(){ FILE *fptr; int arr[7]; fptr = fopen("numbers.txt", "r"); /*numbers.txt contains: 12 14 15 15 17 28 39*/ if(fptr == NULL){ printf("File unable to open\n"); } else{ printf("File opened\n"); } int i = 0; int j = 0; while(!feof(fptr)){ fscanf(fptr, "%d ", &i); arr[j] = i; j++; } for(int k = 0; k ..read more
C Programming | Reddit
8h ago
Short version:
I am looking for a site or book where I can find novice to expert level practice programs specifically for C (not c++, not c#, just c) that also has solutions (possibly multiple) to those problems.
Long Version:
I'm in my 30s so I already feel out of place in college but I have a great desire to have the ability to be sole provider for my wife and future children. Right now I am going to school for Computer Engineering using the G.I. Bill which pays a monthly allowance supplementing my wifes income. If she were the sole provider we could survive on a tight budget so the G.I. Bi ..read more
C Programming | Reddit
19h ago
static const int enumerationCounter[] = { #include "someHeader.h" }; //someHeader.h consists of an enumeration
Then use sizeof enumerationCounter / sizeof int to get the number of entries in the enumeration.
submitted by /u/KillingForCompany
[visit reddit] [comments ..read more
C Programming | Reddit
19h ago
How come this works:
Char name[20] = "Mary";
But this doesn't.
Char name[20];
Name[20] = "Mary";
Am I correct in that the above fails because I'm telling it to put "Mary" in the name[20] element? Is that how it's interpreted?
Is there a way to initialize char name[20] array separately from the declaration without using srtcpy()? Just wondering
Thanks
submitted by /u/apooroldinvestor
[visit reddit] [comments ..read more
C Programming | Reddit
1d ago
I️ usually can find a good YouTube video to help give me get a semi understanding or to get myself started on a problem when I’m lost but I’m struggling on this!! Any tips or pointers or explanations on how to work this? ?? thank you!
Assume that a file named chars.txt exists. The chars.txt file contains a sequence of characters such as: AberGhopQ7n390mnzqwklPo73
Assume that another file named pos.txt also exists. The pos.txt file contains several integers, each on a separate line. 8 12 0 5 2 16
Write a program that reads the integers from the pos.txt file and uses each integer as a byte numb ..read more
C Programming | Reddit
1d ago
submitted by /u/Terrible_Click2058
[visit reddit] [comments ..read more