15,539 Topics

Member Avatar for
Member Avatar for jsphb9000

Hi all, So I'm trying to do this checksum problem for my C programming class but im running into some difficulty. My output is supposed to be this: Line: This is short. Checksum: 2 Line: The quick brown fox jumped over the lazy dog. Checksum: = Line: A. Checksum: O …

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

Hi , I have one buffer size is 50 bytes and reading 50 byte data from file unsigned char bufffer[50]; read(fd,buffer,50); // Consider each byte numerical is value is zero. printf("@@%s@@",buffer); // Here i will get @@@@ only. But I want @@(50 zero)@@ as output(i have to use %c or …

Member Avatar for jephthah
0
77
Member Avatar for westsider123

I'm having trouble with this code, I want to make the answer in (^)and(*) Example : Enter number : 8 Prime factors of '8' : 2^3 Enter number : 56 Prime factors of '56' : 2^3*7 Please help me with this, Thanks![code]#include <stdio.h> /* Find out the prime factors * …

Member Avatar for jephthah
0
423
Member Avatar for cokaznsyco72

I'm having trouble making a variable argument function for my class. When I gcc it, its giving me these errors: my_printf.c: In function `print_str': my_printf.c:14: error: syntax error before '{' token my_printf.c:20: error: syntax error before "__builtin_stdarg_start" here's a code snippet: [CODE]#include <stdio.h> #include <stdarg.h> #include "my_io.h" // ASCII definitions …

Member Avatar for jephthah
0
193
Member Avatar for adxer

Hey I'm having trouble using scanf to input two number and it is only letting me input 1. here is my code [ICODE] #include <stdio.h> int main() { int i ; int j ; int tl[10][25] ; int br[40][5] ; int point1[100][100] ; for(i=0;i<40;i++) for(j=0;j<25;j++) { printf("please enter value x,y …

Member Avatar for dfetter88
0
315
Member Avatar for javedkhan0258

I have these structs. and I have two files one is program.dat and other is course.dat and I am supposed to load the values from those .dat files to the struct. The separation between attributes in program.dat and course.dat is '|' for example programID|programTitle|ProgramCode........ and I have used string tokenizer …

Member Avatar for abhimanipal
0
100
Member Avatar for gear26926

Cud any1 let me know how this code works with respect to pecedence and associativity Thanks in advance[code]#include <stdio.h> main() { int i = -3, j = 2, k = 0, m; m = ++i && ++j || ++k; printf ("\n %d %d %d %d", i,j,k,m); }[/code]

Member Avatar for jephthah
0
113
Member Avatar for Banfa

[QUOTE]This discussion has been moved from [url]http://www.daniweb.com/forums/thread284115.html[/url]. Check there for the beginning.[/QUOTE] = = = = = = = = = = = = = = = = = = = = Actually neither approach is wrong. The original code does not store prime numbers but does correctly identify all …

Member Avatar for 0x69
3
304
Member Avatar for addxztion

So uhm...I want to do the bubble sort and i found a code but actually i don't really know what's missing...ok...sorry but i am just a newbie and not so average of logic(lol. :p). My goal here is to complete this code, 'cause i tried to run it but it …

Member Avatar for addxztion
0
166
Member Avatar for cutedipti

Hello, Can anybody help me on the issue below:- [B]'Features of C language that uses indirect addressing mode.'[/B] I didn't get it's meaning exactly. Whether it is Function 'Call By Value', as we are not refering direct address of variables like in 'Call By reference' or anything else. Please help …

Member Avatar for Ancient Dragon
0
177
Member Avatar for ramakrishnaramk
Member Avatar for mr.confused!

In your opinion, when creating a nested loop is it best to use the call function and if so is using a pointer the route to go when creating the function?

Member Avatar for jephthah
0
143
Member Avatar for hetalraithatha

Hi Everyone, I would like to get some help in a way to convert C code to DLX assembly code.I have tried to search if there are tools available which would perform this, but whatever I find is to convert to MIPS assembly code. Guidance to move further in this …

Member Avatar for UncleLeroy
-1
558
Member Avatar for dfetter88

As you probably know, Shell sort is typically written with a base of insertion sort, as shown below: [code]for (ctr = numGaps - 1; ctr >= 0; ctr--) { k = gapSeq[ctr]; /* Insertion Sort Begins Here */ for (j = k; j < size; j++) { tmp = array[j]; …

Member Avatar for dfetter88
0
79
Member Avatar for skypower

Hello there! I have an exercise that askes me to create a binary file .dat with a structure in it. I have to run it like this: a.out something.dat. Also I have to create a command prompt for the user (input). I am very confused since I don't have linux! …

Member Avatar for skypower
0
130
Member Avatar for purvi12345

C-implementation of M-ary/multiway tree...... madam has asked me to do it as part of my project.... node will contain simple integer numbers.... i didn't code any code for it in book/internet..... plz help,Thanks in advance......

Member Avatar for Tellalca
-3
1K
Member Avatar for 234pramod

Hi, I want to receive data which a device which is sending on usb. How can I receive data.Will there be any C codes available for that? I am very new to device programming.All suggestion are welcome.?? I want how to interface it and get the data.I want to do …

Member Avatar for 234pramod
0
121
Member Avatar for harshchandra

This program generates different combinations of a number or a string as given by the user.just a simple implementation of arrays.

Member Avatar for Nick Evan
-2
249
Member Avatar for speedy94519

Hey you guys. Im doing c code where i have to make a file full of double values and then make another empty one because im going to write into that file. It does compile but i get this: Enter the input file name: randomfile.dat Enter the output file name: …

Member Avatar for WaltP
0
199
Member Avatar for AndrewYY

For the sake of readability, I've been trying to do something like this: [CODE]#define initialize(x)(type x = initfunction()) int main(){ initialize(example); example.item = 0; return 0; }[/CODE] where type is a typedef'd struct, and initfunction() generates one, inits values, and returns it. My problem is, I get these errors: warning: …

Member Avatar for 0x69
0
3K
Member Avatar for COKEDUDE

Here is a good listing of library functions. [url]http://www.cplusplus.com/reference/clibrary/cstring/[/url]

Member Avatar for COKEDUDE
0
90
Member Avatar for skypower

Hello, I am having some strings grammar problems. [CODE] char *eisodos1[50]; char e; int *a; int i; int main() { eisodos1[i]=getchar(); (1) e=eisodos1[i]; (2) if (eisodos1[i] == ' ') g++; (3) while ((e!=EOF) && (a!=EOF)); (4) } [/CODE] Please don't look the code like a complete program, I posted the …

Member Avatar for eager
0
189
Member Avatar for shekar.bdn
Member Avatar for skyspace_as
-2
95
Member Avatar for stirredo

have just "finished" learning C. By finished, I mean I have learned all the basics in plain vanilla C (command prompt style). I want to get into windows developement so that i can create something useful. What should be my next step? Should i be learning a object oriented language …

Member Avatar for Ancient Dragon
0
71
Member Avatar for BabyPink

Hi guys, I badly need ur help.. well am nt zat gud in C programming. I've gt an assignment on a Video Club. To maintain 'its list of videos,the number of copies available for rental, the rental price, date on loan, the return date. Each video record should be represented …

Member Avatar for Ancient Dragon
0
84
Member Avatar for Reprise

I have the following code which basically acts as a typewriter: [code] int main () { char c; puts ("Enter text:"); do { c=getchar(); putchar (c); } while (!feof(stdin)); return 0; } [/code] However when I feed it a text file for input: [icode]$ ./typewriter < input.txt[/icode] it always adds …

Member Avatar for Reprise
0
91
Member Avatar for chained

Suppose if I have a dynArr pointer and a file pointer as parameters, and in the DynArr I am storing a TYPE with an integer value and a string description. How would I put the TYPEs in the DynArr into a txt file while tabbing between the string and the …

Member Avatar for chained
0
121
Member Avatar for tcotto

Hi I've been taking a python course and now that were done the professor wants us to write a program to list all the prime numbers from 2 - 10000. Oh yea and it has to be in C. So I am very stuck and really need help. Heres the …

Member Avatar for 0x69
0
98
Member Avatar for barevhayerable

Hello everybody, is there somebody that can help?? I'm having string (my example in string 55+22)that must be inputed by keyboard .. the first part I've done to put 55 to another array 2(with strtok function) Now that I was tries for many hours to put 22 to an other …

Member Avatar for abhimanipal
0
380
Member Avatar for purvi12345

it prints the integer string b.var CORRECTLY.BUT not it's individual integer constants.....WHY? (ABCD.TXT is a bin text file containing data 10110000)[code]#include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> struct st { int var[8]; }; struct str2 { char a1; float a2; int a3; int a4; char a5; char a6; int a7; char a8; }; …

Member Avatar for abhimanipal
0
151

The End.