Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #3K
~5K People Reached
Favorite Tags

10 Posted Topics

Member Avatar for sebass123

You can set the precision of a number using sprintf: #include<stdio.h> #include<stdlib.h> int main(int argc, char** argv) { float nr1 = 0.0f; float nr2 = 0.0f; float sum = 0.0f; int n = 0; char buffer[30]; printf("Enter the two numbers:\n"); scanf("%f %f",&nr1,&nr2); printf("How many decimal places would you like your …

Member Avatar for dheaven
0
191
Member Avatar for iAndrewMeyer

I would rather do it like this: #include<stdio.h> #include<stdlib.h> #define ROWS 5 #define COLUMNS 4 int main(int argc, char** argv) { int** array = NULL; int i = 0; /* Memory allocation */ array = (int**)malloc(sizeof(int) * ROWS); if(array == NULL) { perror("Not enough memory for matrix allocation"); } for(i=0; …

Member Avatar for Trentacle
0
147
Member Avatar for summer_21

You could do the logical connections by using a graph structure: typedef struct { int id; /*An unique identifier for the gate*/ int type; /*Type of the gate : AND, OR, XOR, etc*/ int numberOfInputs; /*How many inputs you will use*/ LogicalGate *inputList; /*A pointer to an array of LogicalGate …

Member Avatar for dheaven
0
801
Member Avatar for radc

I personally think that low-level programming is the best thing to do when you're at the beginning of your career. When you get older, perhaps you will no longer enjoy time-consuming (but much needed) optimizations in C or Assembly and perhaps you will want to do high-level programming using RAD …

Member Avatar for Dexxta27
0
199
Member Avatar for SuchANewb

[QUOTE=SuchANewb;1730565]Yes, I know that now and that is why I'm asking for help...because I don't know how to code it in my case...it has been bugging me for a few days now and I really hope someone could help me :)[/QUOTE] Something similar to what you're asking was done in …

Member Avatar for dheaven
0
373
Member Avatar for c_learner

[QUOTE=c_learner;1731193]Dear All, I'm new to C, and would appreciate your help about the below code. The purpose of the program is to multiply the elements of the array and print the result. The user enters the value for how many elements he wants to have multiplied, and then the function …

Member Avatar for c_learner
0
2K
Member Avatar for Vetha

[QUOTE=Vetha;1730672]Hello, Here I have a problem, I want to print the word after the Delimiters in a simple text file, but i cant able to do it also cant able to find a good example for that in a web. So please if anyone help for this.[/QUOTE] Check this out: …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for coding101

[QUOTE=coding101;1723742]How do strings work? In C we must declare the size of a char array to represent a "string". But in java we do not allocate memory for the size of a string. So how does the string work? Is there a pre deterimed size assigned to strings from the …

Member Avatar for dheaven
0
244
Member Avatar for J.S.AlKatheeeri

Perhaps this might come in handy: [url]http://dystopiancode.blogspot.com/2011/12/simple-calculator-applet.htm[/url] (it's a calculator applet)

Member Avatar for J.S.AlKatheeeri
0
211
Member Avatar for iPanda

I know an assembly [URL="http://dystopiancode.blogspot.com/2011/12/implementing-strlen-in-asm-for-mcs-51.html"]quasi-implementation of strlen[/URL]. It was made for 8051 microcontrollers, but you may find the logic useful.

Member Avatar for dheaven
0
124

The End.