15,551 Topics

Member Avatar for
Member Avatar for atticusr5

hello all, i am having a real hard time tracing down a logic problem and am looking for help. this program just does a binary search on a sorted list and returns a record. now it works for records that exist. however, i want it to continue searching until an …

Member Avatar for atticusr5
0
109
Member Avatar for samhitha.44
Member Avatar for jnawrocki
-1
240
Member Avatar for slygoth

Write a function that accepts a pointer to a string and a character and returns the number of times the character is found in the string. [CODE] # include <stdio.h> # include <conio.h> # include <string.h> # include <stdlib.h> void countletter(char *str); int main() { char str; printf("Please enter a …

Member Avatar for slygoth
0
211
Member Avatar for ajcc103

Hi, I'm stuck on something and was wondering if I could get some advice! OK I'm passing a double *array1 and a double **array2 to a function pointer array like this: [CODE]void func1(double *array1, double **array2, int i){ array2[0][i] = array1[0]; array2[1][i] = array1[1]; array2[2][i] = array1[2]; array2[3][i] = array1[3]; …

Member Avatar for gerard4143
0
175
Member Avatar for java-utm-stg

Hello I am getting the above error message with my program. The line giving the error is marked. What I am trying to do is create a file, (new.ppm) and have it then returned onto stdout. [code=c] FILE *fp; fp = fopen("new.ppm", "w+"); //creates the new file fprintf(fp, "P3\n%d %d\n255\n", …

Member Avatar for jonsca
0
340
Member Avatar for rjbrjb777

i have two programs.. say 1) intermediate.c ( which creates and intermediate file ) 2) result.c ( which creates final csv file).. is it possible when i execute second program, first automatically generate the intermediate file which is being used in second program?

Member Avatar for WaltP
0
109
Member Avatar for amin2011

hi I want to write my C functions in 2 separate .c files and use my IDE (code blocks) to compile everything together. How do I set that up in code blocks? How do I call functions in one .c file from within the other file?

Member Avatar for dkalita
0
121
Member Avatar for jaku78

Hi. Basically I first made some code to do mergesort on a list of numbers. Worked like a champ. Then I said, what the heck, why not do a mergesort on an array of structs, this is where it gets a little funky. While the first sort of the data …

Member Avatar for dkalita
0
106
Member Avatar for erogol

I need to pass a linked list (via unnamed pipe)that is created by the parent process between one child process to another child (created by the same parent). However I am not sure that it is proper to pass it by address of the head node or the complete structure …

Member Avatar for dkalita
0
129
Member Avatar for george61

In these problem I have to find triangular number by the number of it's divisors. The program takes about 0.65 seconds to find the first triangular number with >100 divisors and about 87 seconds for the number with >200 divisors which means that my algorithm is very inefficient. Any help …

Member Avatar for Momerath
0
521
Member Avatar for AntonAL

Hi! I develop the app, that must be binded to hardware-specific information. This is a part of license protection scenario. The serial number of motherboard must be obtained. How to do it under Windows ?

Member Avatar for somjit{}
0
2K
Member Avatar for gedas

hey everyone, i been set a coursework which i am totally confused about, i have been struggling to even understand it so i hope someone can at least lead me to the right direction. i have been asked to design and implement the pulse counter and draw a function(draw function …

0
51
Member Avatar for Shodow

[CODE]#include<stdio.h> #include<conio.h> main() { clrscr(); double sales[10]; int index; double largestsale,smallestsale,sum,average; //initializing for(index=0;index<5;index++) sales[index]=0.0; //reading printf("Enter Value:\n"); for(index=0;index<5;index++) scanf("%d",&sales[index]); //printing for(index=0;index<5;index++) if(sales[index]<index) printf("%2d",sales[index]); //sum & average sum=0; for(index=0;index<5;index++){ sum = sum+sales[index];} average = sum/5; printf("\nThe Sum is %d",sum); printf("\nThe Average is %d",average); //largestsale int maxIndex = 0; for(index=1;index<5;index++) if(sales[maxIndex] < …

Member Avatar for jonsca
0
149
Member Avatar for ODs

Hello All, I have a little experience with C programming but from last 2-3 years i didnt use C. Now i have to develop a GUI which can send and receive data via RS232. Basically i have to send via CAN (Control Area Network) which is a BUS use in …

Member Avatar for Ancient Dragon
0
432
Member Avatar for MichaelSammels

OK, so I know that I can search binary records in C, by entering the number and returning the corresponding data, however I need to search a binary file using text. In my opinion I would need to load this file into a buffer and search the buffer for the …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for bakwanyana

Hi all I have been tasked to implement a median filter on an image - this involves creating a window that will traverse the entire image. When the window goes out of bounds of the image, the guilty indices are supposed to be set to zero. My problem is that …

Member Avatar for bakwanyana
0
258
Member Avatar for makibao

PLease help me !! how can i uppercase the half only of the string and the half is in lower case??

Member Avatar for makibao
0
146
Member Avatar for honeythigh

hello, i'm a newbie. [U]are c and c++ really similar?[/U] some people say that they are extremely similar, and taking the path of learning c first is better. i'd like to learn both c and c++. [U]which one is better to start with?[/U] and as i mentioned before, i don't …

Member Avatar for peter_budo
0
283
Member Avatar for mkab

Hello everyone. I have an error in my makefile. When i execute it on the terminal in linux, it gives me the following errors [CODE]mkab@mkab-ThinkPad-SL400:~/Desktop/TP 5/src$ make test gcc -c prog2.c gcc *.o -o test prog2.o: In function `tester_supprimer': prog2.c:(.text+0x1c): undefined reference to `ajouter' prog2.c:(.text+0x32): undefined reference to `ajouter' prog2.c:(.text+0x48): …

Member Avatar for gerard4143
0
314
Member Avatar for fazdhli

I can't find whats the error here. Pls help to have a look on this ^^ [CODE]#include <stdio.h> #include <conio.h> #define tax 0.05 struct jitemenu{ char menitem[10]; double harga[10]; }menu[100]; void items(int ,int,double,double); // pengistiharan function void tunjukmenu(); void resit(int, double, double, double); int main() { int Q[10], item,i,c; tunjukmenu(); …

Member Avatar for fazdhli
0
103
Member Avatar for fazdhli

hi all, nice to meet u again. I need your help on this code, which is the programme i still failed to compile. [CODE]#include<iostream> #include<iomanip> #include<string> using namespace std; // Define Struct struct menuItemType { string menuItem; double menuPrice; }; void printCheck(int compMenuList[], int counter2); void getData(int compMenuList[], int counter1); …

Member Avatar for fazdhli
0
212
Member Avatar for geoffy0404

I don't know why my code is failing after building, actually i know the char statements are wrong can anyone tell me how i can fix the char statements and make them correct, all i need to do is initialize a single letter using char [CODE]#include <stdio.h> int main() { …

Member Avatar for geoffy0404
0
166
Member Avatar for chess2009

I would like to write a program with getchar and putchar that read my input and prints one word per line and ignores all semicolon, comma , dot , newline, tab and space. Here is my input: "The Parsnip The parnip, children, I repeat, Is simply an anemic beet. Some …

Member Avatar for WaltP
0
430
Member Avatar for happy143
Member Avatar for Adak
0
52
Member Avatar for virtue

Hi, I wanna traverse inside the file system by using threads and processes.My program has to assume the first parameter is either given as "-p" which offers a multi-process application or "-t" which runs in a multi-threaded way. The second parameter is the pathname of a file or directory. If …

1
143
Member Avatar for shinsengumi

Hi, What command/technique is needed in a C program to receive image bytes through socket programming from an HTTP response? I want to develop a program that requests for an image from a server, then upon receiving the bytes comprising the image, it should write these bytes into a newly …

Member Avatar for shinsengumi
0
269
Member Avatar for amol0712

i want to know half duplex communication using c.so please help me on that topic.

Member Avatar for Ancient Dragon
0
35
Member Avatar for andrew85

Hi !!!!! I have to filter the input for a geniric string with some operations. for example : [CODE] char buf [] ="25+2;44+1;8-2." char op1[20]; char op2[20]; char operazione[20]; char en[20];//in this varible i put ";" for the next operation , I put "." becouse the operations are end sscanf(buf,"%[0-9] …

Member Avatar for andrew85
0
152
Member Avatar for george61

This is a fragment of a program for finding palindrome numbers.Every checked number is a string which is reversed...and I'm using array of strings which isn't done right. Any help will be greatly appreciated. [CODE]#include <stdio.h> #include <string.h> void isPalindrome(char *str1[],int l){ int str1size = strlen(str1[l]); int n; int misMatch …

Member Avatar for b56r1
0
108
Member Avatar for b56r1

int c; while ((c = getchar()) != EOF) In the above code, why it is prefereble to use variable 'c' as integer datatype rather than character datatype eventhough we are assigning characters to 'c' ? Can any one explain clearly??

Member Avatar for b56r1
0
115

The End.