15,552 Topics

Member Avatar for
Member Avatar for priyabalu87
Member Avatar for dkalita
-1
141
Member Avatar for Kombat

You are required to write a C program that accepts two decimal integers, say d and r. You may assume that the first decimal integer d is nonnegative and that the second decimal integer r which represents the radix, will be one of 2, 3, 4, . . ., 15, …

Member Avatar for yellowSnow
0
2K
Member Avatar for TGeorge824

Hi, for an assignment I have to do, we have to made a Stack and Queue, and read data from a file and add to queue and push onto the stack. Well, I made an array implementation of a stack that works fine, but the array implementation of the Queue …

Member Avatar for Dave Sinkula
0
915
Member Avatar for nateuni

My unit doesn't teach this so I am unaware about the correct syntax to go about what I want to do. I have hit google but have produced no answers to my specific problem. So here we go. I have a series of nested structs. Is this possible that instead …

Member Avatar for nateuni
0
525
Member Avatar for tomtetlaw

When I try to compile the Quake 2 Source code from the if Software website, I get this error: ------ Build started: Project: quake2, Configuration: Debug Alpha Win32 ------ Compiling resources... Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1 Copyright (C) Microsoft Corporation. All rights reserved. .\win32\q2.rc(10) : fatal error …

Member Avatar for tomtetlaw
0
100
Member Avatar for Gaiety

can i use statements like: int num; fread(&num,sizeof(num),1,stdin); fwrite(&num,sizeof(num),1,stdout); i tried this and debugged the code the variable is having the correct value. but that is not getting displayed. can't i use stdin , stdout in fread and fwrite.

Member Avatar for codeguru_2009
0
1K
Member Avatar for jhunluis

This program I wrote has the following error: (33,5):Declaration syntax error (64,2):Declaration missing ; [CODE]#include <stdio.h> #include <conio.h> int range1(int a); int range2(int b); int range3(int c); int range4(int d); int main() { int in, ctr, ctr1=0, ctr2=0, ctr3=0, ctr4=0, ctr5=30; for(ctr=1;ctr<=30;ctr++) { printf("Enter %d integer values within 1-200: ", …

Member Avatar for Salem
0
164
Member Avatar for TGeorge824

Hey Guys, sorry but i guess I posted a code snippet when I shouldnt've. That was my first daniweb thread. The program I'm trying to run checks to see if a number is perfect, abundant or deficient. It's perfect if its factors add up to the number(ie 6 = 3+2+1), …

Member Avatar for yellowSnow
0
93
Member Avatar for hoke

Using \x I can specify hexadecimal numbers in strings in C, but if I put \x00 then it interprets it as an instruction to terminate the string. As a result I can't express a hexadecimal number with 00 in it using a string! Is there some way around this?

Member Avatar for Ancient Dragon
0
604
Member Avatar for chathu12

Hello every one. I coded a program to seperate words from a file and want to input each seperated part to an array.But it doesnot work.Please help me!! Here is the code [code]#include<stdio.h> #include <string.h> #define max 100 int main() { FILE *f; char data[128]; char *p; int host=0; int …

Member Avatar for dkalita
0
162
Member Avatar for Samyx

Hi everyone, this is what I have to do: The method [code]makeWordList (char *fileName)[/code]. this method will take in a file name, read from the file and identify the words in the file. These words should be stored in a global array for use in the next method. The method …

Member Avatar for Salem
0
120
Member Avatar for TGeorge824

The program I'm trying to run checks to see if a number is perfect, abundant or deficient. It's perfect if its factors add up to the number(ie 6 = 3+2+1), deficient if the number is greater than the factors, and abundant if the factors add up to more than the …

Member Avatar for TGeorge824
0
99
Member Avatar for bernadlosini

The question given like this using the CreateProcess () in the Win32 API. In this instance, you will need to specify a separate program to be invoked from CreateProcess(). It is this separate program that will run as a child process outputting the Fibonacci sequence. Perform necessary error checking to …

Member Avatar for Sameer.coder
0
970
Member Avatar for sacredmaiden

Hi everyone, i'm new here, and also new in InfoTech education (i'm a freshman student) I don't really know what's the exact word for it, so it's pretty hard for me to search it in this forum but.... can anyone help me out? how can i use WHILE in reversing …

Member Avatar for Sameer.coder
0
115
Member Avatar for vivekarora

Hello Friends, We have a known problem in our hands: Allocate some memory, and get a pointer to that memory. Now, no one stops this pointer to perform memory overrun or underrun(i.e. writing before the allocated memory). I wish to implement 2 functions as MyMalloc() & MyFree(). When I use …

Member Avatar for vivekarora
0
208
Member Avatar for OneDreamCloser

hi all , i hope you can help me with the following : in types.h : [code=c] /* Structure of input buffer for each switch */ typedef struct InputBuffer *InputBufferPtr; typedef struct { struct List **fifo; /* Input fifos: one per output. */ void *traffic; /* Placeholder for traffic stats …

Member Avatar for Salem
0
132
Member Avatar for Grn Xtrm

Hello friends. I'm very new to C and am still learning how to do basic stuff. I got the code to work in C++ (which I'm much more fluent in) but I'm having trouble converting it to C code. [code=cpp] #include <iostream> using namespace std; double factorial( int n); int …

Member Avatar for Grn Xtrm
1
199
Member Avatar for Gaiety

Hello, i found two codes for finding out the height of the tree (this is what creating confusion for me which one is correct) 1. int height( BinaryTree Node t) [COLOR="Red"]{[/COLOR] if t is a null tree return -1; hl = height( left subtree of t); hr = height( right …

Member Avatar for Tom Gunn
0
114
Member Avatar for DoEds

I just found this example in my book. After running the program in will only ready the first line of my file. Ex. inside my file "PhoneBook.txt" Mine 12345678 Hers 1234567 Them 123456 It will only read "Mine 12345678" ignoring "Hers 1234567 and Them 123456" How will i'll make this …

Member Avatar for DoEds
0
112
Member Avatar for jralexander137

I'm trying to find the largest int in an array and then print it out to the screen. Here is what I have so far: [code=c]void LargeNumber(int numbers[], int k){ int len = k; int i = 0; int big_num = 0; for(i=0; i<len; i++) { printf("i is: %d\n", i); …

Member Avatar for dkalita
0
106
Member Avatar for splurchner

I wrote this small program for a class im taking, and its supposed to take an int n and a radix (int between 2 and 16) r and give me the number converted to the new base. It only has to go from decimal to other radix's. I run my …

Member Avatar for splurchner
0
189
Member Avatar for jralexander137

I'm a little lost when it comes to initializing a dynamic array. I am counting the number of integers that appear in a given text file and incrementing a counter which will then be used to set the size of the array. Here is what I have so far: [code=c] …

Member Avatar for Salem
0
168
Member Avatar for cristian.sorin

Hello. I have this simple program that open a file and read lines from it and print them to screen. #include <errno.h> #include <stdlib.h> #include <stdio.h> int main() { char line[4096]; FILE *fp = fopen("/root/Desktop/testfile","r"); if( fp == NULL ) { exit(1); } while(fgets( line, sizeof(line), fp ) != NULL …

Member Avatar for codeguru_2009
0
147
Member Avatar for Gaiety

Hello, I am working on tree stuff but i am very confused of Tree concepts and balanced trees , height of the tree. What is an expression tree? how to create the expression trees. Please request you to do the need.

Member Avatar for Tom Gunn
0
81
Member Avatar for ubi_ct83
Member Avatar for kvprajapati
0
175
Member Avatar for hket89
Member Avatar for jralexander137

I'm trying to scan a line from a data file(txt format) it just contains a line of ints ex. 3457983257892 I need to scan the line and get the total number of individual ints. Basically, 34563456 would total to 8. I'm not sure how to manipulate a while loop using …

Member Avatar for Salem
0
98
Member Avatar for Nathan Campos

Hello, I'm starting in the development under PocketC and i want to know if here in DaniWeb we have other users that are using the same software. Regards, Nathan Paulino Campos

Member Avatar for serkan sendur
0
73
Member Avatar for MrNoob

hello i m suppose to do this program which should pass array of ptrs to a structure intilise and put student[i] info in each array i did most of it but now i got problem coz i cant just pass address of structure since its an array of ptrs to …

Member Avatar for MrNoob
0
149
Member Avatar for ameneh_p

hi i want to get it's implementation as soon as possible. i will be thankful for your help. :icon_redface:

Member Avatar for mrnutty
0
154

The End.