15,551 Topics
| |
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 … | |
i tried to get some programs in google but the theory part was mentioned in it without programs | |
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 … | |
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]; … | |
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", … | |
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? | |
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? | |
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 … | |
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 … | |
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 … | |
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 ? | |
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 … | |
[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] < … | |
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 … | |
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 … | |
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 … | |
PLease help me !! how can i uppercase the half only of the string and the half is in lower case?? | |
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 … | |
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): … | |
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(); … | |
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); … | |
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() { … | |
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 … | |
| |
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 … | |
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 … | |
i want to know half duplex communication using c.so please help me on that topic. | |
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] … | |
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 … | |
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?? |
The End.