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

learn more… | top users | synonyms

-1
votes
2answers
137 views

Assigning strings to pointer in C Language

I am a new learner of C language, my question is about pointers. As far i learned and searched pointers can only store addresses of other variables, but cannot store the actual values(like integers or ...
-1
votes
2answers
3k views

Want to create a simple gui app using C++ but dont know what to use [closed]

I have learned C++ to an intermediate point and now I'd like to create something beyond a console program. I would like to create a simple program that grabs info from specific text files and displays ...
-1
votes
2answers
121 views

Reading assembly useful for insights when writing C/C++? [closed]

While in most cases its not necessarily, recently I have taken to reading the generated assembly of my C code every so often, when I'm curious as to the kinds of optimizations my compiler is making. ...
-1
votes
2answers
428 views

What is the best programming language to do crypto running time measurement? [closed]

I am trying to measure the running time of different crypto algorithm. e.g. how long it takes to encrypt/decrypt a block of plaintext. May I ask if C with OpenSSL is the best PL to do this?
-1
votes
2answers
546 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 ...
-1
votes
2answers
215 views

How should I group these variables?

I have a shape that will be defined by: char s_type; char color; double height; double width; These variables are scanned in from a request string sent to my server and passed into my printing ...
-1
votes
1answer
211 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) ...
-1
votes
1answer
100 views

Creating a window to draw pixels in [closed]

I'm creating a fictional architecture and other fictional components for this computer/emulator. I'm facing an issue, this being the virtual display. I need to be able to create a Window in which my ...
-1
votes
1answer
111 views

A Server sending data to be processed to clients [closed]

About a year ago I had an idea in mind which was using my friends computers to help me process my data, so I programmed a socket server application with boost::asio, and gave the client part of it to ...
-1
votes
1answer
2k 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 ...
-1
votes
1answer
442 views

mobile app development noob [closed]

I know c, most of c++, a little assembly, win32 console, etc I'm looking for free, cross-platform, c / c++, emulator, etc. I'm a beginner to the mobile app world, so I'm lost. Some that pop to mind ...
-1
votes
0answers
12 views

Problem with C code. Raspberry PI, HD44780 LCD [migrated]

I have been writing a program for interfacing a raspberry pi with a HD44780 LCD. The code I have wrote does not seem to initialise the display, from the datasheet as far as I can tell I am doing the ...
-2
votes
1answer
117 views

Ambiguous If-else nested block in C without braces [closed]

Consider the following code in C: if(34) if(0) printf("Stat1"); else printf("Stat2"); Here,the first if condition is true,while the second if condition is ...
-2
votes
4answers
214 views

Benefits of porting C library to C++ [closed]

Say we take any C library such as libpng or libvorbis and convert it so that it compiles as C++ (only the minimum changes to make it compile as C++ code). Can the compiler do extra optimizations when ...
-2
votes
3answers
603 views

Associativity in C

int i = 2*5/2; int j = 2*(5/2); printf("%d\n,%d\n",i,j); Variable Associativity: when I run this program, the first statement gives me i = 4; Shouldn't it give me 2, because according to BODMAS ...
-2
votes
1answer
279 views

Could ChromiumOS be re-written in Go from the ground up? [closed]

As Go seems able to performance match C and with Google obviously biased towards Go, I feel that it would be great way for Go to gain more traction. The way ChromiumOS/Chrome has jumped from an ...
-2
votes
2answers
114 views

Returning void from a function specified to return int [on hold]

int count_to_ten ( int count ) { /* we only keep counting if we have a value less than ten*/ if ( count < 10 ) { printf("%d",count); count_to_ten( count + 1 ); } return; } int ...
-2
votes
1answer
109 views

Uniqueness of for loop [closed]

How does the for loop function is implemented so that it can accept ; as parameter separator rather than , which is trivial in normal functions.
-2
votes
2answers
430 views

Why we still need C in terms of development for high level programming modules? [duplicate]

Possible Duplicate: I don't know C. And why should I learn it? I was kind of awkward in coding with C, though I am somewhat familiar with it. I like Java and C#. The reason I like to ...
-2
votes
3answers
305 views

What is some key aspect of C/C++ I need to know? [closed]

I had some C background back in the university, however, I have been programming in java for 2 years and most of the C stuff were left behind. Now I need to prepare for a test about C/C++, I doubt ...
-2
votes
2answers
403 views

Shouldn't storage classes be taught early in a C class or book? [closed]

Shouldn't storage classes be taught early in a C class or book? I notice that a lot of books, even some of the better ones, covert it toward and end of the book and some books just add it as an ...
-2
votes
1answer
109 views

How can we make a certain thing inbuilt in c language with our own header file?

I want to make the basic trigonometric functions in maths inbuilt functions using my own header file . so as the users can do trigonometry in c language compilers.
-2
votes
1answer
161 views

What are steps in making an operating system in C ? [duplicate]

I am trying to make an my own OS. This is for educational purpose only, so that I get to understand the internals as well as get a good idea of low level programming. I have some prior application ...
-2
votes
4answers
884 views

C simple arrays and pointers question

So here's the confusion, let's say I declare an array of characters char name[3] = "Sam"; and then I declare another array but this time using pointers char * name = "Sam"; What's the ...
-2
votes
1answer
928 views

Is C a pre-requisite in order to learn C++ effectively? [duplicate]

I only have programming experience with high-level languages, as well as with DBMS. Now, I would like to get into C and/or C++. My question is: Is the C language a pre-requisite in order to learn C++ ...
-2
votes
1answer
239 views

C Minishell Command Expansion Printing Gibberish

I'm writing a unix minishell in C, and am at the point where I'm adding command expansion. What I mean by this is that I can nest commands in other commands, for example: $> echo hello $(echo ...
-2
votes
0answers
139 views

How to call a function with argc & argv? [migrated]

I'm currently trying to create a GUI for an existing command line program using QT, as a learning exercise. The original code was written in c, and I have included the c wrapper for the c++ bit. I ...
-2
votes
0answers
25 views

Problems Initializing a Struct at Declare Time Using Char Pointer [migrated]

I am trying to declare and initialize a struct using a char* pointer. Compiling the code below fails if I do anything but thing things[] = {{3,300},{4,*text}}; Linux gives me a core dump when it ...
-3
votes
4answers
291 views

What are good strategies in C for dealing with pointer errors of this type?

In C, I often come across errors with code like this prio_queue->head[index] = newEntry; Yields a " "Cannot assign Entry** to Entry* " How do you prevent/debug errors of this type, in general? ...
-3
votes
1answer
107 views

Implementing keyword “const” [closed]

A constant pointer is a pointer which points to a fixed memory location throughout.The question is how do you ensure that this behavior is ensured without using the keyword constant while declaring ...
-3
votes
3answers
376 views

More Accurate Random in C [closed]

I have 3 IPs and every IP has a weight, I want to return the IP's according to its weights using the random function. For example if we have 3 IP's X with weight 3 Y with weight 3 and Z with weight ...
-3
votes
2answers
653 views

I'm having trouble understanding these exercises wording [closed]

Exercise 1-20. Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. Should n be a ...
-3
votes
1answer
288 views

Should i shift from Testing to Development? [closed]

i have 1.2 yrs of experience in Testing in big MNC company, I have good Programming knowledge in Java (Core,Servlets). I have completed ISTQB certification(Testing) and trying for HP QTP ...
-3
votes
0answers
34 views

Output of a program [migrated]

{ int a; a=4; cout<<a++<<++a; } The output of the above C++ program is 56 but why it is not 46 As a++ first print the value then increment a.
-3
votes
0answers
35 views

Developing linux p2p applications [on hold]

I have been tossing the idea around in the old noggin of creating a simple p2p chat application that would run in a linux environment and possibly be written in C. It's been awhile since I have ...
-3
votes
0answers
91 views

The bad habits formed in the process of learning the C programming language [closed]

In the Cambridge University Computer Science curriculum booklet of 2012-13 under the module entitled 'Foundations of Computer Science' it states: The main aim of this course is to present the ...
-3
votes
0answers
68 views

Precedence of operators [closed]

int x=2,y; y= x++ + x-- - ++x; printf("%d",y); When I compiled using Turbo C++, I got 3 as the output. For the GCC compiler, I got 1 as the output. Why does the output vary?
-4
votes
2answers
867 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 ...
-4
votes
1answer
110 views

Calculate Pi to N number of places [closed]

I am trying to work out how to calculate Pi to N decimal places, I think the default DP's for a float/double is 5 and then you have setprecision() however these are obviously inadequate, I need ...
-4
votes
0answers
43 views

Allocating memory inside a function and returning it back [migrated]

I want to pass a pointer to my function and allocate the memory to which this pointer points. I've read in other posts that I should pass a double pointer to this function and I did so, but I keep ...
-5
votes
2answers
571 views

what will be the Output of the following code written in “ C”?

#include<stdio.h> void main() { char ***p="hello"; printf("%c",++*p++); } I haven't understand the concept of (*) indirection uses here three times. When i compiled this program then the ...
-5
votes
1answer
269 views

C quiz, puzzles obfuscated C [closed]

I believe that I am a good C programmer. I can solve beginner level Question in google's code jam. I did solve all of the programming examples in KN kings: C programming. Given a problem I can express ...
-6
votes
1answer
74 views

C program for Tree Traversal without Recursion [on hold]

I want to write a C function for Tree Traversal without Recursion. The program that involves recursion is too simple, I want to do the same thing without recursion. I know the algorithm but couldn't ...
-7
votes
2answers
4k views

What would be the prototype of printf?

look at these calls closely: printf("hello, world\n"); printf("%d", 2); printf("%d%g\n", 2, 2.3); we see that printf can accept any type and any number of args. however we know that functions in c ...