19,876 Topics

Member Avatar for
Member Avatar for galmca

[code] #include<stdio.h> #include<conio.h> struct link { int data; struct link*ptr; }; typedef struct link node; struct link1 { int info; struct link1*next; }; typedef struct link1 node1; int main() { int i,size; node*start,*temp,*p; int j,listsize; node1*start1,*temp1,*k; clrscr(); { printf("enter the size of first list:\n"); /*creating first list*/ scanf("%d",&size); printf("enter list:\n"); …

Member Avatar for devnar
0
262
Member Avatar for peachslasher

Hi guys I am trying to implement a buddy system using C, I've free the memory using myfree() and i've allocated memory using mymalloc(). I've tried to run the program, but it keep on generating segmentation error, would you guys please see the code, and tell me if you've spotted …

0
74
Member Avatar for atman

Hello., I haveto check for non-numerci input, when reading numeric input. I know how to validate numeric input with while loop, but what if i need numeric input and user inputs alphabetic letter, any suggestions?? Thanx a lot! cheers!

Member Avatar for devnar
0
99
Member Avatar for atman

Hey guys! I'm trying to calculate the average for student marks using pretest loop, and for some reason i get the wrong result, even though the code looks proper to me., there are 7 questions all of them totaling 100%, i haveto return average mark i HAVETO use pretest loop. …

Member Avatar for Aia
0
145
Member Avatar for jhuyenh

hey guys, i posted a encoding/decoding thread a litle while ago. i've gotten some what far on it, but now i just don't know how to write the most important part. the actual decoding. i need to essentially cut the secret message numbers (22384) and only use the first two …

Member Avatar for jhuyenh
0
108
Member Avatar for BestJewSinceJC

Its basically telling me it doesn't know wth the pow() function is. But at the top of the file, I have #include<math.h> so shouldn't that work? And right after I have the #include, I declared the function definition of bintodec, so that isn't the problem either. [CODE]int bintodec(char* array){ int …

Member Avatar for BestJewSinceJC
0
114
Member Avatar for Superstar288

hi everyone just starting ansi c but i seem to be having problems i have to make a program which checks if the user input is uppercase,lowercase or digit which i have done but for some reason i cant seem to do character counts ive tried one way but it …

Member Avatar for Superstar288
0
117
Member Avatar for gunjanagrawal

U can find all the program in c.If du u have any query about c plz ask me and also program

Member Avatar for nucleon
-1
186
Member Avatar for songkok

hello everyone. i have search through the forums but unfortunately couldnt find the solution. if this topic has been discussed before, do give me the links to that thread. i work as intern now and my employer asked me to program a software using c++ but they want it with …

Member Avatar for songkok
0
118
Member Avatar for blackslither

I had to implement Game of Life in a 3D matrix (int a[ ][ ][ ]) , but the complexity of my implementation is O(n^6) (6 imbricated for) and it runs very slow . Can anyone help me with an optimized version of Game of life , even with a …

Member Avatar for ArkM
0
91
Member Avatar for IrishUpstart

I am trying to write a program to find the integrals of a function, where the computer determines the number of slices that it should use, going through a loop until it finds the change small enought to ignore. I want it to have a tolerance of .01% Can anyone …

Member Avatar for devnar
0
106
Member Avatar for ajay.krish123

While entering the password and id in the program ,i want the program should not display any of those entered characters. While enter the password it should show the astericks for eg. ****** By using Scanf,it is not possible.. By using getpass() function it just doesn't display any thing on …

Member Avatar for ajay.krish123
0
108
Member Avatar for amvx86

Hello all, I've built a program which will take users data from the command line using int main (int argc, char *argv[]). However, when i wrote the program; i can successfully extract the options specified --php --html, etc. What i'm having a hard time with is writing the program to …

Member Avatar for WaltP
0
104
Member Avatar for henks

[code] #include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> int main(){ char input[10]; int i,j,digit,out[10],flag=0,sum; while(flag==0){ sum=0; flag=0; strcpy(input," "); scanf("%s",&input); fflush(stdin); digit=strlen(input); printf("%d\n",flag); if(strlen(input)>8){break;} /*else { for(i=0;i<8;i++){ if (input[i]!=48&&input[i]!=49){ flag++; break; } } }*/ printf("%d\n",digit); printf("%d",flag); if (flag==1){break;} for(i=0;i<8;i++){ if(input[i]!='\0'){ if(input[i]=='1'){ out[i]=1;} else if(input[i]=='0'){ out[i]=0;} } } j=1; for(i=0;i<digit;i++){ sum+=out[i]*pow(2,digit-j); j++; } printf("Decimal …

Member Avatar for henks
0
145
Member Avatar for ragaven

Hello friends............ How to check whether the given file path is valid or not in C,independent of OS......... Please reply immediately......... Thank you.........

Member Avatar for Ancient Dragon
0
344
Member Avatar for slimjimmer

Hi. I'm new to C, so I have probably made an elementary mistake in my code. I am trying to make a program for finding roots of a quadratic equation, using if and else, but first I'm trying to get used to using the sscanf function which I have never …

Member Avatar for slimjimmer
0
435
Member Avatar for ajay.krish123

plzz help i have to make a program in c in which the windows (output screen) to scroll up and down with mouse as require??? i have been searching for long time but didnt got any cluee??

Member Avatar for Ancient Dragon
1
280
Member Avatar for coolbuddy059

I'm writing a code for all the algorithm mention in cormen there are term DISK-READ and DISK-WRITE. Actually what the author want to say by using these terms.

Member Avatar for ArkM
0
143
Member Avatar for kapil.tandon

hi i added modal popup handler into my application the popup which enmrges out is a panel and inside the panel i added the label and correspondong to label there is one textbox(txtE1) now the problem i m facing is tht i want to write the method related to the …

Member Avatar for kapil.tandon
0
248
Member Avatar for sharpst

I have got to create a simple calculator in a college level intro to c prog class, my calculator must be able to do division multiplication addition subtraction using whole numbers. Any ideas on what i should do? please help

Member Avatar for ajay.krish123
0
786
Member Avatar for scl84

Hi! I want to know if it is possible to display a binary tree using double linked list as follows: A / \ B C / \ / D E F I tried some possibilities but i think it is impossible since there are lots of parameters to take in …

Member Avatar for Prabakar
0
88
Member Avatar for jhuyenh

Hi, i'm very new here and very new to C. I'm trying to figure out how to encode and decode in my C class. i was given a two txt files to use. one is the decoding symbols and the other are the codes i need to decode. i started …

Member Avatar for ajay.krish123
0
430
Member Avatar for atman

Hello, Im taking C in school, and i have a problem with my code, nothing happens at all when i run the program. The task is: A program is required that prompts the user for a number. The program will then print a series of asterisks to represent the number. …

Member Avatar for Aia
0
170
Member Avatar for thanatosys

First here is my header file [code=c] /* @source Simplespell Program * * @author: Chris King(cpking@ncsu.edu) * @@ * * node.h * CSC 230 Fall 2008 * * The @ signs along with the word denote specific information about * the program. Using the standards described in: * http://emboss.sourceforge.net/developers/c-standards_new.html */ …

Member Avatar for Aia
0
291
Member Avatar for atman

Hello., I'm working on my school assignment and the condition is to use post-test loop trying to get following result: --------------------------------------------------------------- Enter the Section Code: 0 Invalid value entered. Must be 1 to 4, please re-enter: 1 Enter the Student's ID: --------------------------------------------------------------- this is the assignment condition: When the program …

Member Avatar for Aia
0
237
Member Avatar for yuvaraj.tr

Hi friends i am new to embedded domain. I would like to learn embedded C ,.. Where i get free books to learn embedded C.......... and whre i get free compilers to execute embedded c programms.......... I am using linux os.............. please help me................. Advance Thanks for helping

Member Avatar for yuvaraj.tr
0
64
Member Avatar for Kevinle

I am searching for the topic, and I don't know whrere to start. Pease advise. Your assistance is greatly apprecieated. Thanks. Kevin

Member Avatar for Lerner
0
93
Member Avatar for kyserthehun

Hi, i'm having a little trouble with my Zeller's Algorithm problem. Everything seems to work fine unless the year is 1600, 1700, 1800, ect. I've been trying to figure out where i went wrong but to no avail. I'd appreciate any advice. Thanks. [code] #include <iostream> #include <iomanip> using namespace …

Member Avatar for ddanbe
0
789
Member Avatar for yinfu89

Sorry , Newbie here i have no clue on how to do "Write a complete C program to read twenty (20) integer numbers. Then count and display the number of even and odd numbers among the twenty (20) integers read. Use a while loop to perform the repetition task." is …

Member Avatar for ddanbe
0
133
Member Avatar for localp

i want to convert a string to an integer value... for example :: if there is a string called "Guy" G=7; // in the alpherbert G is = 7 u=21; y=24; i want the out put to be as >> 7 21 24 can some one plzz help me to …

Member Avatar for skatamatic
0
131
Member Avatar for blackrobe

I've been reading an article but the code is written in C language which I don't get at all... The code is: [CODE]void traverse(Tptr p) { if (!p) return; traverse(p->lokid); if (p->splitchar) traverse(p->eqkid); else printf("%s/n", (char *) p->eqkid); traverse(p->hikid); [/CODE] Someone please translate it to python...

Member Avatar for tyincali
0
159
Member Avatar for paynegm

So i need to use scanf() to get input of positive ints from the user and then print the number out and then ask again and keep doing this till the user enters a negative number. with what i have it prompts the user to enter a number then prints …

Member Avatar for Dave Sinkula
0
43
Member Avatar for kapil.tandon

hi , like i have to create a label and that label displays the total cost of a particulat think.like i do some activity A. related to acctivity A are following activities. A-a A-b A-c A-d what i hv to do is when user click on the label.it pops up …

Member Avatar for dickersonka
0
94
Member Avatar for carlos_lopez_m

Hi everyone: I'm calling an Excel file from C#; now, because I Want to run automatically a Macro, I've added to my Workbook code, Private Sub Workbook_Open() the name of the routine I want VBA to execute as soon as the file is open. The problem is that C# is …

Member Avatar for carlos_lopez_m
0
147
Member Avatar for ahfan_85

I hv This Question here: User will be prompt for number of quiz that has been taken. User has to input their marks for each quiz. Your program will calculate the average of the marks. Find the lowest mark of those quizzes. Find the 3 highest mark of those quizzes. …

Member Avatar for ahfan_85
0
295
Member Avatar for manjuptm

Hi, i want to store a hex values 01 00 A8 E3 56 E1 into a byte array and send it through socket can anyone suggest a way to store this thanks,

Member Avatar for Narue
0
73
Member Avatar for kyeong

Use the given void function. This function will find the flight whose departure time is closest to desired_time(expressed in minutes since midnight). It will store the departure and arrival times of this flight (minutes also) in the variables pointed to by departure_time and arrival_time, respectively. Here's what I've gotten so …

Member Avatar for devnar
0
150
Member Avatar for happy8899

Can anyone show me how to solve the 8 puzzles either using the heuristic search thank you. if u can , u may attach the sourcecode too. thank u :cheesy:

Member Avatar for ahyeek
-1
174
Member Avatar for rock_climbr

Hey everyone, I'm currently trying to use LabVIEW for pattern recognition to find the angle of a product using one version of the hough transform for circles. I'm having a problem and I'll do my best to explain it. I have my code working for all test images (or at …

Member Avatar for ArkM
0
110
Member Avatar for cproud21

If i have 5 int variables with values stored in them, is there a command to find the lowest valued variable?

Member Avatar for financeSEObegin
0
72
Member Avatar for StainlessSteelR

For my homework I have to create a program with functions and nexted while loops. I have got most of the program written but it's not executing how I want it to. The program is setup as a football program, (RB = Running Back it's a football playing position) it …

Member Avatar for ndeniche
0
225
Member Avatar for kidd218

This is about the arrays...I thought a lot...but I couldn't get any ideas from that...please help me.. thanks!! the question: A series of numbers can be read from the keyboard and put into an array of integers. You will then need to call a function to invert the values (1/x) …

Member Avatar for Aia
0
125
Member Avatar for jkun2

For my second project in C we have to write a program to take in 2 arguments, one being a directory path and another being an int level_val. If level_val is -1, files in the parent directory are to be listed, and so on up the directory tree for -2, …

Member Avatar for Ancient Dragon
0
194
Member Avatar for just11

Q) Draw an inheritance hierarchy for class Quadrilateral, Trapezoid, Parallelogram, Rectangle and square.Use Quadrilateral as the base of the hierarchy. Make the hierarchy as deep as possible. Can anyone help me to create it as a proper program?

Member Avatar for seanhunt
-1
322
Member Avatar for tatainti55

How does vertexes work? I'd like newbie friendly answers and in detail :) PS: I've already tried to google it but i couldn't find any good answers. So no "omgz google is your friendz n00b" answers please. :)

Member Avatar for Salem
0
97
Member Avatar for thanatosys

I am still working on the lovely trie project, now I am working on file input that will be passed into the trie. I receive the following errors when I compile this code. [code] $ make gcc -Wall -g -c -o spellback.o spellback.c spellback.c: In function ‘main’: spellback.c:36: warning: implicit …

Member Avatar for thanatosys
0
133
Member Avatar for naeem1986

Dear all, I am trying to build a code which finds a string from an opened file ,, but in order to find it it must tokenize every line first.. here is the code segment, If any of u can help plz.. [CODE] #define MAX_MSG = 100 int main (int …

Member Avatar for naeem1986
0
128
Member Avatar for theausum

[code=c] #include<stdio.h> #include<conio.h> #include<string.h> void permute(char *str,int l,int pos,int r); void swap(char &a,char &b); void print_string(char *str,int r); int main() { char str[10]=""; int l,r; printf("Enter The String : "); gets(str); l=strlen(str); printf("Enter The Number Of Places To permute on : "); scanf("%d",&r); printf("The Following Permuations are possible : \n\n"); …

-1
43
Member Avatar for Ixeman

Well if you guys may help can you help with converting this to vb.net at this thread :D [url]http://www.daniweb.com/forums/post721914.html#post721914[/url]

Member Avatar for skatamatic
0
56
Member Avatar for unleashedvigil

I am needing to have this program choose between two options randomly. The program all works except that when I use this line of code: int x= rand() % 2; it seems that it's not random but rather follows the same pattern every time. I have searched and found things …

Member Avatar for unleashedvigil
0
86

The End.