19,876 Topics

Member Avatar for
Member Avatar for bundersi

In the program, it can calculate the summation and subtraction of two integers. The integer can have 100 digits and can also be negative. How can i do this ?

Member Avatar for Salem
0
157
Member Avatar for me_ansh

Hi, I am facing a problem, I am accessing a text file through my C program to fetch some values. The problem is that, i want to check whether the text file is updated before opening it, as i want to save the time of opening the file again if …

Member Avatar for Salem
0
158
Member Avatar for dhiliptce

[code=cplusplus] #include<stdio.h> #include<stdlib.h> #include<iostream.h> main() { FILE *fp,*fp1; int numbers[30]; char *buffer; int i=0,j; // To read the file fp=fopen("PR1.txt","r"); if(fp==NULL){ printf("Error: can't access file.c.\n"); exit(1); } else { printf("File opened successfully.\n"); for(i=0;i<10;i++) { // while(!feof(fp)) { /* loop through and store the numbers into the array */ printf("Number- %d", …

Member Avatar for rajenpandit
0
120
Member Avatar for ahamed101

Hi All, I am trying to write a common function called call which will take in a void* and an int type. Based on the int type it will have access to different structures. The code doesn't compile in the first place. I am not sure this is correct or …

Member Avatar for ahamed101
0
110
Member Avatar for slimjimmer

I am trying to produce a program which produces a random array of numbers but I am running into a problem in that when the array becomes even a little large, say 10x10, I get the Bus Error or Segmentation Fault (I think I still get the error with even …

Member Avatar for Salem
0
227
Member Avatar for drjay1627

I'm doing a OS class. Trying to implement this pseudo code: * Forking is fun! ­ Simple tips First, fork the child process: pid_t ForkPID; ForkPID = fork(); Then write a quick switch statement! switch (ForkPID) { // ­-1, fork failure case ­-1: printf("Error: Failed to fork.\n"); break; // 0, …

Member Avatar for drjay1627
0
144
Member Avatar for lonely_girl

I need a statement to exit my program after goto statement but i dont know where to place this statement. The statement is: [CODE=c]printf ("Enter \".\" to exit or \"p\" to proceed"); scanf("%c",&ch); if (ch=='.') getch(); if (ch=='p') goto repeat;[/CODE] also tell me if its rite or not? [CODE=c]#include<stdio.h> #include<conio.h> …

Member Avatar for lonely_girl
0
136
Member Avatar for EZO

Hello, and welcome... I have a small question about class functions. Before anythig to understand my problem, when I have this file "test.h" which contains: [code=cplusplus] #ifndef TEST_H #define TEST_H class aFile { private: char *src; char *dst; public: void Copy(char *src, char *dst); }; #endif//TEST_H [/code] Also I've another …

Member Avatar for EZO
-1
115
Member Avatar for Anshulpareek
Member Avatar for Duoas
0
45
Member Avatar for Somersett

If I allocate memory to a pointer which has been declared inside of a function as static, and don't free() it, is that memory freed when the function returns?

Member Avatar for Duoas
0
114
Member Avatar for swetharvss

Hi....I need to convert a 1D array into a 2D array of numbers....can anyone help me out with this? the problem goes like this... I have a string of numbers say.. 0.123762 0.346515 . . . . . to a total of 275. i need to group them in the …

Member Avatar for swetharvss
0
136
Member Avatar for Demonisya

Hello Once Again..... I need you to help me with this program im working. My teacher asked me to create a program that could arrange the random numbers from lowest to highest.... but I can't follow up what's next in my program: [CODE=SYNTAX] #include<stdio.h> #include<conio.h> int main() { int a,b[10]; …

Member Avatar for its.romi
0
413
Member Avatar for lonely_girl
Member Avatar for csurfer
0
1K
Member Avatar for deepugtm

I use Turbo C++ compiler.I want to include a photo through C program using file handling or something else.Do somebody have any idea for this.

Member Avatar for deepugtm
0
94
Member Avatar for real_castilla

Hi all, I'm a newbie with C or C++. I have a raw PCM file 16-bit (like a wav file but no header). I need to build a console application that can read the file, store data in an array, modify it (ex: add 100 to each value of the …

Member Avatar for rafi867
0
4K
Member Avatar for subhas.236
Member Avatar for death_oclock
0
107
Member Avatar for flipjoebanana

Hello, I am trying to as the title says within linux environment within my C program this is what I have so far: [code] int file_out = open(filename_var,O_RDWR|O_CREAT); if((child_pid = fork()) >= 0) /* successful fork */ { if(child_pid == 0) { /* Child process */ close(1); dup(file_out); close(file_out); f(execvp(command_var,command_args) …

Member Avatar for csurfer
0
79
Member Avatar for caroll

sir, pls help me to write a coding in c for algebraic reconstruction method..... 1 2 3--------->6 4 5 6--------->15 7 8 9--------->24 | | | | | | | | | 12 15 18 Its a three dimensional one in dat first row addng threenos get into 6 and …

Member Avatar for devnar
0
161
Member Avatar for EvilOrange

I have written this Parser for a formal grammar, to me it looks like it should be ok but when i tried to run it a Segmentation Error comes up - i have run valgrind its got leaks but it does come up with an error. Can anyone spot what …

Member Avatar for mad93
0
124
Member Avatar for rohithnair

Dear Friend, I am working on outlook - c# integration. I am developing a s/w to access all outlook information like to traverse on all folders that exist in Outlook. But now I got stuck because i can’t access the area Email accounts where the email settings are there like …

Member Avatar for LizR
0
73
Member Avatar for RyFo18

So I'm trying to create my first ever Makefile and have run into some issues. My program is broken down like this: filter.c - contains main() includes.h - #defines io/file_io.c - contains some functions that main() uses io/file_io.h - included in filter.c and file_io.c Hopefully that is clear enough. Now …

Member Avatar for RyFo18
0
138
Member Avatar for masterarcher

[code=c] void EvaluateHighScore(top10scores ListToBeChecked[], unsigned char Time) { unsigned char RankTen = ListToBeChecked[9].TimeTaken, loopcounter=0, NewRank=0; char UsersName[USERNAME_LENGTH], MoveName[USERNAME_LENGTH]; if(Time >= RankTen) printf("\n\n\tYou Took %d Seconds To Complete The Quiz Well Done\n\tUnfortunatly You Didn't Get A High Score\n", Time); else { printf("\n Please Enter Your Username: "); fflush(stdin); gets(UsersName); for(loopcounter=0; loopcounter<TOPTENSCORES; …

Member Avatar for ianvdl
0
108
Member Avatar for riahc3

Hey The title is a bit confusing so Ill explain. I have a function that returns random values from 0-4 for the computer (which has numberofplayers). Lets say number of players is 2. One is me and the other is the PC. I (myself thru a scanf and I being …

Member Avatar for Salem
0
183
Member Avatar for aashaw

Hi all, Can anyone send me the Apriori Algorithm implementation in C and a dataset so that I can able execute and learn. Your help is greately appreciated. Thanks, Arthur

Member Avatar for Salem
0
108
Member Avatar for anu123d

Greetings, how can i write a search program to search a user entered string saved in an array, in a text file using File Operations in C. Specially using fseek() function. Plz reply, Thanks in advance..!

Member Avatar for Narue
0
86
Member Avatar for Vms100

I'm developing a mod for Quake2. When the level is changed, some stats are cleared and some are written to save game file. My mod has a level system that affects the power of weapons, etc things. But, then i encountered a problem. I want to save my character data …

Member Avatar for Vms100
0
93
Member Avatar for thorster

Hi! I am new to C and need some advice here. I have a solution to this problem but I still think there should be a way to do this more efficiently: I have a file where I have stored null-terminated strings including the '\0' char. I now want to …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for lonely_girl

HI I need a little help with this program [code=c] #include<stdio.h> #include<conio.h> void main () { float num1,num2,result=0; char ch; clrscr(); printf("\nEnter 1st num:"); scanf("%f",&num1); printf("\nEnter 2nd num:"); scanf("%f",&num2); wrong: printf("\nEnter + for addition" "\nEnter - for subtraction" "\nEnter / for division" "\nEnter * for multiplication\n"); scanf(" %c",&ch); if (ch=='+') …

Member Avatar for lonely_girl
0
140
Member Avatar for orthographer

hey..i am a novice when it comes to C programming coz i am a bio-engineer..however, i landed a job with an It giant, and we have been allotted a project(for practice's sake though!) by them on a trainee level..ofcourse, it involves a normal-login program..i was able to figure out most …

Member Avatar for WaltP
0
208
Member Avatar for xmoon2000@gmail

Hi, I ran the code beloew but with different version of the "if" statement. Do either boolean, int or double comparisons. Astonishingly, they all give the same order of timings! I would have assumed that boolean would be MUCH fatser than doubles. Can anyone explain why this is? Moon std::clock_t …

Member Avatar for StuXYZ
0
185
Member Avatar for simonrangus

anyone have maybe image rotation function implemented in c (included in gtk+/gnome) environment

Member Avatar for death_oclock
0
61
Member Avatar for orthographer

As some of you would already know, I made a program which accepts login and password from users and shows "*" instead of actual password characters. I know the program is grossly incorrect but I still tried to apply whatever I picked up using books and example programs. *****DISCLAIMER- I …

Member Avatar for orthographer
0
325
Member Avatar for jan1024188

Hello guys, I have 2 questions.... 1. I don't know what format is the best for saving screenshots in. I have tried .BMP, its good quality, but 5MB per screenshot is just not acceptable. I have tried .JPG, but quality is too low. TGA is crap (you need apple quicktime …

Member Avatar for Salem
0
172
Member Avatar for ceal21c

Hello All, My name is Jason Woodside. I am new to this site and new to C\C++. Thank you for having me! I am experimenting with C\C++ in particular "Blaze C" and trying to program a handheld PC. I am receiving compile errors when using header files whose functions are …

0
38
Member Avatar for anu123d

Project Name : " Employee Information System " I am trying to add a new department name in "dept.txt" file. using file Operations and funcctions defined in String Header file in C Problem is in fnAddDepartment() function. When i run program in VC++ compiler, it says : Debug Assertion Failed! …

Member Avatar for Murtan
0
224
Member Avatar for s-a-n-d-e

i need to merge two arrays..assign them to another array..but in the third array..no similar values shall be printed..i badly need help.. a big big thanks in advance..

Member Avatar for Salem
0
174
Member Avatar for sarawilliam

Hi I want to know how we can measure C execution time by seeing the clock cycles generated from the assembly code. Thanks...

Member Avatar for Narue
0
204
Member Avatar for drjay1627

I'm working in a project and part of it is to do a small encryption program. W can use substitution encryption where each character is substituted by another pre-determined character. Can someone kindly help me with an algorithm. I just can't think any more! Thanks drjay

Member Avatar for drjay1627
0
161
Member Avatar for seebharath

I have a a function that is written in pure unmanaged c++ . i want to convert this to a dll and use this in a c# application .. Is this possible and if so how? Can anyone please give some sample code to do this or any links. I …

Member Avatar for Ramy Mahrous
0
294
Member Avatar for priyankasoni

can i know what does 'occurence of characters & special characters like \n,\t ,white spaces given text input' mean . can i know the code for writing this program?

Member Avatar for Nick Evan
0
73
Member Avatar for hsoni007

How can i make a chequebook balancing program of an user’s account? It will use getline() to read a line, which will contain either the word [B]“withdrawl”[/B] or [B]“deposit”. [/B] The next line will contain the amount of the withdrawl or deposit. After reading each pair of lines, the program …

Member Avatar for riahc3
0
201
Member Avatar for me_ansh

The man page of 'sscanf' says: "EOF is also returned if a read error occurs, in which case the error indicator for the stream (see ferror(3)) is set, and errno is set indicate the error" I am confused that what kind of read error may occur if sscanf is reading …

Member Avatar for me_ansh
0
94
Member Avatar for Rein Valdez

Sir, i do have this problem and im quite unaware about the variable declaration and the algorithm in creating this problem? thank you.

Member Avatar for Rein Valdez
0
117
Member Avatar for akim_atl

1 of 25 The ______ of a function take(s) information into the function from the calling statement. local variables input arguments output arguments prototype purpose 2 of 25 What is displayed by the C statements below if the value input is 3? scanf ("%d", &n); if (n = 5) printf("Equal\n"); …

Member Avatar for WaltP
0
269
Member Avatar for aburich_44

This has only one function to solve projectile motion, but it doesnt seem like it works, why? [code] //Richard Chaaya //1-25-09 //kinimatics #include <iostream> #include <conio.h> #include <iomanip> #include <string> using namespace std; int main() { //declare variables double dblVix = 0.0; double dblViy = 0.0; double dblVfx= 0.0; double …

Member Avatar for StuXYZ
-1
122
Member Avatar for daddanakunadan

Hi friends can any one help me to solve this problem. I want to display the inputs of text boxes by using datadrid control. i am using visual studio2005.I tried with the following code [code] (datagridobject).DataSource=(arrayname) [/code] but this displaying column name as "length" and its values are numeric.How can …

Member Avatar for Antenka
0
102
Member Avatar for urufukiba

im trying to make a program that reads a text file in the format: 2 polygon 3 90 90 90 90 90 90 polyline 2 12 80 30 15 (not the real numbers obviously) and have the program read how many things, what type, how many points for that type, …

Member Avatar for urufukiba
0
95
Member Avatar for niall_heavey

I am trying to make a database of images. The purpose of this is for Robocup soccer tournament. When the robot sees an image while playing it can then refer to its database of images and match its image with one in the database. The database image should have properties …

Member Avatar for Nick Evan
0
83
Member Avatar for taichou

hi, it's me again, uhm i have this program for bantumi game, this program is running, but there are some problems i am encountering whenever i execute it.. hope you understand my program.. [code=c] //this is a two player bantumi game,the user will enter the position in the board game …

Member Avatar for geemicah
0
133
Member Avatar for gsingh2011

The End.