C is a general-purpose computer programming language used for operating systems, games and other high performance work.
0
votes
2answers
67 views
Is there a better way to organize my module tests that avoids an explosion of new source files?
I've got a neat (so I thought) way of having each of my modules produce a unit-test executable if compiled with the -DTESTMODULE flag. This flag guards a main() function that can access all static ...
1
vote
4answers
138 views
Encapsulate standard C functions?
While studying the C programming language and learning safe practices, I'm inclined to write a layer of functionality over several parts of the standard library. This would serve two purposes: I ...
-4
votes
1answer
52 views
memory allocated direclty result in segmentation fault [on hold]
void main()
{
struct a
{
int i;
char *st1;
};
typedef struct a ST;
ST *str1;
str1=(ST*)malloc(100);
str1->i=100;
strcpy(str1->st1,"Welcome to Oracle");
printf(" %d%s\n",str1->i,str1->st1);
...
-2
votes
0answers
62 views
How to get started with my custom entertainment system?
I am C / C++ / Java programmer. For a project at school, I would like to essentially create my own Roku box style system. It would be an entertainment system that you connect to your TV or computer ...
-4
votes
1answer
72 views
How do we link console output window with editor as well as compiler? [on hold]
If i want to create an IDE, then i'll make an editor and link it with a compiler for compilation then how an IDE and compiler makes a link with output window or invoke a output window ?
2
votes
2answers
74 views
What could be the advantages and disadvantages of decay of Nd arrays to N-level pointers?
I have been thinking of a couple of possible extensions to the C language which I'd like to know the opinion of others about.1 This one is about multi-dimensional arrays.
Imagine the following ...
0
votes
0answers
5 views
SIGSEV violation in quicksort implementaion [migrated]
please help me fix the SIGSEV bug at line 5 ( acc to gdb) in this quicksort implementation:http://ideone.com/i04HMG
-5
votes
0answers
42 views
Implement a new class, named NewString [closed]
Implement a new class, named NewString, to allow string handling (char *) and
provide basic string operations:
- Assign strings.
- Compare
- Concat
- Copy constructor
This main function must work with ...
1
vote
2answers
234 views
Is it better to learn C on linux than windows? [on hold]
It seems like most good books for learning C (like the K&R bible) teach you how to program C on a Linux environment. Like after compiling with the gcc compiler you are told to run "./a.out" and ...
2
votes
2answers
105 views
Design document for project in C
I have had some experience in documenting the design for project developed in OOP languages. I made classes and used class diagrams to showcase the overall design structure of the implementation when ...
-2
votes
0answers
50 views
problem in comparing two strings character by character [closed]
So i am making a program which searches the string "the" in the main string and then omits it.The problem is that it omits string "the" but it also manipulates the characters starting with "t".
...
6
votes
6answers
421 views
Should my team use some common well-regarded coding standard as a basis for own own?
The R&D team I'm in has decided to adopt a coding standard. We have only recently formed, and have too little code and common coding time of our own to base our standards/conventions document on ...
14
votes
2answers
559 views
Why does Java not put the filename in args?
In C and C++, the main method holds the filename in the first position of the array at argv[0]. In Java, however, the filename is not included in the args string array.
Is there a practical reason ...
0
votes
2answers
350 views
Languages implemented in Python?
AFAIK, Scala and Clojure are implemented in Java and Java is implemented in C. I suppose that many or most languages are implemented in C, for instance Perl, Python and SQL. I don't know much about ...
15
votes
10answers
814 views
Is learning C essential for Computer Science? [closed]
I am a front-end developer who barely even see a file with .h or .c extension.
I know basic C syntax, I've learned it in Unreality but never was interested in such
low level programming because it ...