15,552 Topics

Member Avatar for
Member Avatar for imran_s

[code=C] #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> int toAnyBase(int n, int toBase); // from base 10 (2nd) int toBaseTen(char array[256], int fromBase); // from any base (1st) int fromAnyToAny(char input[],int fromBase,int toBase); int main() { char input[10]; int fromBase=0; int toBase=0; int answer=0; int answer2=0; printf("Enter number :"); …

Member Avatar for Aia
0
4K
Member Avatar for emilio

hello i wonder if there is a way to return an array in function like in java lang for example: int[] ret (int i,int j) { int[] a = (i,j} ; return a ; } or can i ewturn a pointer to a new array? i need it for function …

Member Avatar for Duoas
0
97
Member Avatar for LilLady

The assignment is as follows: 1. Print name 2. Ask user "How many cycles?" and accept integer answer. 3. Ask user "How many samples per cycle?" and accept integer answer. 4. Calculate total number of samples and allocate an array of doubles to hold them. Initialize doubles to zero. Hint: …

Member Avatar for Duoas
1
130
Member Avatar for tu_m.aimes

I'm trying to sort a list of names alphabetically, by isolating the first element of the string and compare, which I think should work, but there's an error, SISEGV with something about an invalid access to storage... I don't know, but my group mates and I can't figure this out. …

Member Avatar for Duoas
0
151
Member Avatar for poiuy

plz suggest a simple C program to find out greatest number using array....

Member Avatar for Salem
0
60
Member Avatar for garap
Member Avatar for Narue
0
60
Member Avatar for deadswitch

Hey folks -- DaniWeb has helped me a lot with various other programming projects, but I've run into a snag that I just can't get myself to understand. Hooray for vague compiler errors. Hopefully someone here can show me the error of my ways. I'm making a little game, based …

Member Avatar for Aia
0
134
Member Avatar for FoX_

Hi all... How can I control any postfix expression is valid or not??? I controlled it using a stack(the code is below) and it worked but I 'm using the stack again after clearing it for evaluation the postfix expression to the infix expression.I'm using the stack twice and I …

Member Avatar for FoX_
0
2K
Member Avatar for vinaychalluru

Hi,every one I am going to find whether the given number is a armstrong number or not and I have done my level best and I need your help in one thing,If any mistakes,please reply and I need your other views to develop my C skills.hope help from you all …

Member Avatar for Narue
0
75
Member Avatar for Majestics

Can Any One Tell Me How To Handle Registers In C ,while We Are Dealing With Mouse Handling ... Can Any One Explain With Some Example.

Member Avatar for Ancient Dragon
0
79
Member Avatar for dangerd

I have a systems programming problem. Its a group of small programs that interact with each other to implement a mutual exclusion problem. I was wondeing if somebody could comment them to help me understand them better. Would be very much appreciated. They are toilets shared by boys and girls. …

Member Avatar for fuhaohowy
0
88
Member Avatar for piscean123

Need your help in this code too.. this is the program to convert any entered number into its hexadecimal equivalent but the problem is that same result is printed for any number...:'( :'( [CODE]int main (void) { int n; printf("Enter Number :"); scanf("%d", n); printf("Hexadecimal Equivalent %x", n); getch(); return …

Member Avatar for piscean123
0
135
Member Avatar for fhshockey05d

The ultimate goal is to send simple messages ("GH", "HC", etc.) to a CMUcam2 and to read what messages I get back. I need help in setting up a serial communications port in Windows. I have seen how to open the port on other threads on this website, but I …

Member Avatar for Ancient Dragon
0
193
Member Avatar for binaryboy

Hi all, Having some trouble with an assignment. My program should store lists of names and ages and sort the list by name (alphabetic). Here's my current attempt [code=c] #include<stdio.h> #include<string.h> // struct to hold the data typedef struct _data { char name[5][30]; int age[5]; } data; int main() { …

Member Avatar for Ancient Dragon
0
130
Member Avatar for cjwenigma

Hello.. I'm trying to use OpenGL to draw the great pyramid model and have it rotate.. i'm having trouble with my points as you can see they are commented out. I'm also trying to figure out how to turn the eye point and how to rotate it... here are my …

Member Avatar for jbennet
0
412
Member Avatar for Pierrot le fou

Hello ! I am looking for a paper that reviews the currently available commercial C compilers, in order to choose one of them. My principal expectations for a C compiler are: efficient debugging, user-friendliness and optimisation possibilities... So far, I selected more or less two compilers (Visual C++ and Borland …

Member Avatar for Narue
0
96
Member Avatar for asilter

i have a loop displaying current number of file which is being created. [code] for(i=1;i<=nFileCount;i++) { ... printf("%d. file has been created\n",i); } [/code] but i dont want the display to write ". file has been created." again and again as a list. I want only the i change. how …

Member Avatar for Salem
0
92
Member Avatar for ITapprentice

I am opening a file for writing and changing it a bit. I have changed all uppercase characters to lowercase. I have also deleted all characters that are not alphabetic, but I can't delete apostrophes that occur after and before another alphabetic character (i.e. the word "there's" or "don't" would …

Member Avatar for Narue
0
213
Member Avatar for locy

how do i write the following functions:can somebody help me with this programm? [code] int lengthOfString(char *string); [/code] the longer the text that is given,the longer the text caculation [code] int letsFactorise(int charCount); [/code] the length of the texts in order of prime number,if no prime numbers then give Error-code …

Member Avatar for Aia
0
73
Member Avatar for theteamdrunk

I am writing code that accepts a string of a filename, then capitalize the letters, not changing any numbers or special characters. I think I am on the right path, but can some one give a little push to the right direction. [code] #include <stdio.h> #include <string.h> #include <stdlib.h> #include …

Member Avatar for Aia
0
206
Member Avatar for piscean123

Peoples i have tried to make this simple progrem in C... that will print alphabets A to Z and their equivalent ASCII code.. like this A 65 B 66 . . . Z here is da source code... int main (void) { char code; for(code = "A";code <= "Z"; code …

Member Avatar for Narue
0
144
Member Avatar for rpjanaka

hi all, i want to get the dependancy graph from the make file or make rules. please if anyone can, help me to do this

Member Avatar for Duoas
0
82
Member Avatar for NatalyC

Hello everybody :) I have a problem about sorting a linked list. The following is the code that I wrote in C, it works well at this moment; it just generates random numbers, it just prints the random numbers generated and the even numbers. But I need to sort these …

Member Avatar for NatalyC
0
98
Member Avatar for abhishekgahoi

/*please try to this pg in gcc*/ #include<stdio.h> main() { char a,b; printf("enter the char for a"); scanf("%c",&a); printf("entered value of a is = %c",a); printf("enter the char for b"); scanf("%c",&b); printf("entered value of a is = %c",b); }

Member Avatar for Narue
0
29
Member Avatar for tech2chill

wap to print following pattern?? [code] ABCDEFGFEDCBA ABCDEF FEDCBA ABCDE EDCBA ABCD DCBA ABC CBA AB BA A A [/code] the pattern is not showin up proper,,but hope u guys get it.. its kinda /\ shape formation b/w those letters this is wat i tried out..... int i,j....; int m=65; …

Member Avatar for tech2chill
2
455
Member Avatar for BensonRoss

This is another problem that I'm having that goes along with a previous question that i asked. The basic program is that a person puts in two DNA strings that consist of only A,T,C,or G. DNA strings work to where A can only match with T, and G can only …

Member Avatar for Salem
0
78
Member Avatar for MiTiM

I have one problem, and i have no idea what is happening? THE output gives some strange things: type of your cpu is: amd cpu speed is: 123 enter the year when it's produced 2000 enter the price of your computer [B] scanf: floating point formats not linked[/B] abnormal program …

Member Avatar for Salem
0
253
Member Avatar for Fredszky

I spent 5-6 hours today to try to get a working searchfunction for my textfile, can someone please put me in the right direction? I have this textfile, its a register over contacts: [code] Number Contacts = 3* James Brown:555-12345:james@brown.com Jack Yellow:555-42345:jack@yellow.com Sally White:555-12345:sally@yahoo.com [/code] For example, i want to …

Member Avatar for Fredszky
0
103
Member Avatar for pdwivedi

I want to open a text file in a c program which is on desktop.How can I print the texts written in the file on screen.Please help [B]Regards Prashant[/B]

Member Avatar for WaltP
0
122
Member Avatar for BensonRoss

I am new to the world of C but am enthusiastic nonetheless, so pardon me if this appears to be a particularly basic question... I am attempting to write a program that uses DNA strands.. which consist of A,T,C,and G characters... The user is prompted to input a DNA strand. …

Member Avatar for Aia
0
181

The End.