Tagged Questions

C is a general-purpose computer programming language used for operating systems, games and other high performance work.

learn more… | top users | synonyms

1
vote
0answers
14 views

Programming in a competitive environment as a motivator

I figured that a big motivator for me has always been competition. That's why I am looking for a platform where I can spend my free time coding on a project which will be compared with other projects ...
35
votes
4answers
13k views

Why do programming languages, especially C, use curly braces and not square ones? [closed]

The definition of "C-Style language" can practically be simplified down to "uses curly braces ({})." Why do we use that particular character (and why not something more reasonable, like [], which ...
-5
votes
1answer
63 views

Want to learn C quicker way after PHP [closed]

I am working with PHP and JavaScript for 3 years and now want to learn C. When I see C programming books all of them explains from the concept of programming, what is variable, what is data type... ...
-2
votes
1answer
106 views

Building a Web Server in C [closed]

I've recently been developing a web server in C. I was wondering what are potential language-choice drawbacks that I might run into from developing a web server in C. Are there other languages better ...
-1
votes
1answer
59 views

Compile GPL-code into a JNI-capable shared library and use it in commercial software [closed]

I am developing an application for Android in JAVA which calls GPLed C-code via JNI. I have modified & capsulated a GPL-software under a JNI-interface and compile it as a shared library (.so) ...
0
votes
0answers
32 views

Reason for the output of the following code : [migrated]

I have a few lines of code for which I could't understand the reason for this output.. int main() { int a=5; float b=10.5,c=11.0; printf("%d",b); printf("\n%d",c); printf("\n%f",a); return 0; } ...
-1
votes
0answers
57 views

C++ Secure Connection to DB [migrated]

I have always had this question in mind and hopefully one of you will know the answer. I have heard over the Internet / News that Software Coding like C++ is reversible, which as far as I understood ...
-4
votes
0answers
91 views

An interesting compiler to make [closed]

To learn a bit more about compiler construction and have some fun, I'm planning to create a full compiler using LLVM in my spare time. Any ideas, what kind of compiler will be useful. I want to target ...
-3
votes
0answers
90 views

How to prepare for a interview that covers internet protocols? [closed]

I am a 2nd year computer science and electronics student and I applied for a internship this summer, I am scheduled to have an face to face interview(first time, really excited) on 21st this month(9 ...
1
vote
1answer
214 views

Using assembly to write to a file

I am working with a trading application (reading data from the exchange) which generates a bucket load of data on a per second basis. We have different "log-levels" but even the minimal log-level ...
-1
votes
0answers
41 views

Specialization options for my graduation? [closed]

Just a introduction about myself: i have completed my Engineering in Electronics and communication, and working in EMC leading storage vendor. I have sound Knowledge in C programming, basics in UNIX ...
-4
votes
1answer
103 views

GCC compiler for C and other languages [closed]

I have gone through many reference documents about how a GCC compiler optimizes program. But I am not sure how actually a programmer request GCC attempt to optimize a program. Plz help answering this ...
0
votes
3answers
187 views

C/C++ in applications that do not concern performance [closed]

C is the best language (or maybe the single language) suitable for operating systems, drivers, embedded systems etc. For more complex domains like computer graphics C++ is a better choice. But these ...
4
votes
1answer
224 views

programming PID loops in C

I'm an electrical engineer that was kind of thrust into the digital world and learning as I go. I'm programming a TI processor to do a PID (proportional-integral-derivative) loop, illustrated by this ...
-4
votes
1answer
224 views

Learning advanced programming [closed]

I'm from India and it's not really a good place for learning and education. I'm an IT student, I've been studying various programming languages like Java, C, C++, VB etc. And its my final year in ...
6
votes
7answers
363 views

When should pointers be checked for NULL in C?

Summary: Should a function in C always check to make sure it is not dereferencing a NULL pointer? If not when is it appropriate to skip these checks? Details: I've been reading some books about ...
0
votes
0answers
51 views

Portability: Python's C/C++ libraries/extensions vs JRuby's Java libraries

I've had some discussion with colleagues who chose to go with JRuby along the following line of argumentation: JRuby can make use of anything that is available in Java, ergo such programs are more ...
0
votes
2answers
196 views

Need some advice and feedback on my code's design

I am looking for feedback on the design of my program. I have a shell script call function.sh that defines a lot of helper functions. My intent is to use those bash functions defined in functions.sh ...
32
votes
2answers
5k views

What is the purpose of NaN boxing?

Reading 21st Century C I arrived at chapter 6 at the section "Marking Exceptional Numeric Values with NaNs", where it explains the use of the bits in the mantissa to store some arbitrary bit patterns, ...
3
votes
2answers
70 views

Library design: provide a common header file or multiple headers

There are essentially two camps of library designers concerning the design of the final header file inclusion: Provide a single header file that includes every other header file that makes up the ...
-2
votes
0answers
44 views

Removing Linker error C++ [closed]

I installed OpenCv 2.3 superpack binary and added all the libraries and stuff to visual studio. I also updated the Envoirnment Variable "Path" with the libraries and dlls. I followed every single step ...
1
vote
1answer
95 views

Implementing a sort of navigation system

So I am undertaking a project which does navigation sort of thing. So here is how the problem statement looks like. Say, given a map of a floor, with different rooms, now somehow, this information is ...
2
votes
1answer
291 views

Where did the T in wchar_t come from?

In many native types, a common suffix (and sometimes prefix) of t or _t is used to denote platform-independent types (such as wchar_t, int32_t, etc.) What was the logic behind the letter t as opposed ...
-3
votes
2answers
509 views

Why aren't there modern C IDEs? [closed]

Why weren't the features present in modern IDEs for Java & C# (Intellij IDEA, Visual Studio, eclipse) developed in (earlier) IDEs for C language? I mean I don't know any IDE which has modern ...
2
votes
4answers
396 views

Initializing char array with string

I don't remember how I got to the thread, but I was reading its replies and one of them states that you should never initialize a char[] with a string literal. My question: Is initializing a ...
1
vote
1answer
131 views

Parallel computing using xcode

I'm making mandelbrot fractals in C using Xcode and I want to use parallel computing but everything I've tried so far doesn't work. Such as This Question and other how to guides. Whats the easiest way ...
3
votes
2answers
404 views

Low Latency Unix/Linux

Most low latency/high frequency programming jobs (based on job specs) appear to be implemented on unix platforms. In a lot of the specs they make particular request for people with "low latency linux" ...
-1
votes
2answers
224 views

How to practice programming? [closed]

I've been a PHP developer for 5 years now. Before I started working in that field, I've been practicing at home. I've created my own CMS, so I could actually show some of my code to the potential ...
-2
votes
1answer
116 views

Should I go back to school to do computers if I have an MA degree? [closed]

I'm new to the forum so I will take this question down if it's not considered a good one. Thanks for your patience. Can I do computer programming at a major company with an MA in Political Science if ...
0
votes
1answer
149 views

Does this style satisfy 1TBS? [closed]

1TBS is often described as requiring braces around all code blocks following if/while/for etc, but the primary quality of that style is that a new line of code may be inserted into the code between ...
-2
votes
2answers
184 views

Difference in different C compilers [closed]

C comes in various forms like Turbo C, Borland C, Visual C++, C++, C#, C Borland Compiler, C++Builder, TurboC Simulator etc. I am confused in all of them. I think that difference in C, C++ and C# is ...
7
votes
5answers
777 views

Is code duplication a necessary evil in C?

I'm rather new to C, and I'm wondering if code duplication is a necessary evil when it comes to writing common data structures and C in general? I could try to write a generic implementation for a ...
21
votes
2answers
848 views

What does it mean to expose a C++ code publicly as a C API and what are the advantages of doing it?

I often hear people say that C++ programmers should expose their library's/product's public API as a C API. What does that mean and what are the advantages of that?
-1
votes
1answer
193 views

Streaming data from a microcontroller to a server? [closed]

Edit *We have a heart monitor hooked up to to an msp430 with a roving networks wifi module. I would like to connect send some type of a datastream to a webserver so that someone could watch it ...
2
votes
6answers
516 views

What is a 'Null Terminated String' ?

I have just started reading C++, and I came across a term "Null Terminated String", I read about it but couldn't understand what it actually stands for. I also want to know what is the difference ...
6
votes
1answer
155 views

Difference between language virtual machine and emulating vm?

I'm having a hard time understanding the difference between an emulation virtual machine and a language vm. I started with the research and implementation of an emulation virtual machine. Primarily ...
4
votes
2answers
160 views

What is the lifecycle for loading a Linux Desktop Environment?

I'm looking into delving into a bit of custom OS work (and yes I understand that doing any development at the DE level or lower on an OS is extremely complex and not a light thing to undertake, ...
0
votes
3answers
295 views

How to efficiently store IP addresses? [closed]

Background I have a requirement where I need to remove a few nodes in a network based upon a command given by the user. To keep the nodes from transmitting or receiving data I thought of changing its ...
-3
votes
2answers
148 views

graphics abstraction (C) [closed]

What are some techniques, concepts, models, design patterns, or general advice you would use/follow to make an effective abstraction for an event driven graphics library in C? Specifically I'm ...
-7
votes
3answers
121 views
11
votes
8answers
793 views

Does low latency code sometimes have to be “ugly”?

(This is mainly aimed at those who have specific knowledge of low latency systems, to avoid people just answering with unsubstantiated opinions). Do you feel there is a trade-off between writing ...
2
votes
3answers
175 views

is Microsoft LC random generator patented?

I need a very simple pseudo random generator (no any specific quality requirements) and I found Microsoft's variant of LCG algorithm used for rand() C runtime library function fit my needs (gcc's one ...
4
votes
1answer
146 views

unseen/unknown function definition in linux source

Can any one please explain this piece of code I found in the linux kernel source. I see a lots of code like this in linux and minix kernel but dont seem to find what it does (even if C compilers ...
2
votes
8answers
416 views

tips, guidelines, points to remember for rendering professional code? [closed]

I'm talking about giving clients professional looking code. The whole nine yards, everything you hardcore professional highly experienced programmers here probably do when coding freelance or for the ...
-7
votes
2answers
182 views

Should this be written in C or php? [closed]

This is my code; it speaks for itself on what I'm trying to do. <?php define("html","<html>"); define("htmlEnd","</html>"); etc... etc... ?> What I'm trying to do is make a ...
13
votes
7answers
1k views

Why does Clang/LLVM warn me about using default in a switch statement where all enumerated cases are covered?

Consider the following enum and switch statement: typedef enum { MaskValueUno, MaskValueDos } testingMask; void myFunction(testingMask theMask) { switch theMask { case ...
0
votes
3answers
221 views

Which language is more suitable heavy file tasks?

I need to write a script (based on basic functions) to process /image/audio/video files. The process is mainly filesystem tasks and converts. The database of files has been stored by mysql. The script ...
-1
votes
2answers
101 views

What are the ways to start making actual/real-world programs using Java/C++ to excel my Programming Skills? [duplicate]

Possible Duplicate: How do I improve my coding skills? How I do become a better programmer as a junior developer The programming that we learn at university is not that vast, like those ...
11
votes
12answers
2k views

Why do operating systems do low level stuff in C and C++? Why not just C++?

On the Wikipedia page for Windows, it states the Windows is written in Assembly for the bootloader and task switcher, and C and C++ for kernel routines. IIRC, you can call C++ functions from an ...
-2
votes
3answers
274 views

How to persuade C fanatics to work on my C++ open source project? [closed]

I am launching an open-source project into a space where a lot of the development is still done Linux-kernel-style, i.e. C-language with a low-level mindset. There are multiple benefits to C++ in our ...

1 2 3 4 5 10