19,876 Topics
![]() | |
Hi I am very new to C++ and I was told to make a program that start with the ammount you choose but it has compound interest of 6% a year (0.5% a month) and you take out 500 dollars a month, at what months and years would the account … | |
I am writing a program that reads from a file that contains a list of appointments and then put them into an dynamic array named day. I am having trouble figuring out what is exactly wrong with my program. It keeps on crashing before it finishes reading the file. I … | |
hello. this is my first post in here :) im new to programming and im learning C as my first language. I need help on this problem, i am making a running clock and it prints out in this format: 1:1:11 but i would like to make it look like … | |
[CODE]#include<stdio.h> #include<conio.h> void main() { int z; int x,y; printf("enter the value of x:"); scanf("%d",&x); printf("enter the number y:"); scanf("%d",&y); z=x+y; printf("%d",z); getch(); }[/CODE] | |
Hey guys I am stuck with this program and i need help with it this is what i got until now [CODE] #include <stdio.h> #include "checkit.h" double vectorDotProduct(double x1, double y1, double z1, double x2, double y2, double z2) { return(x1 * x2 + y1 * y2 + z1 * … | |
Hi i am looking for a good C compiler for windows vista. I found Visual Studio C++ 2008 express edition, will this work if im writing in c? | |
I'm in trouble with data structures mam.. i want to finish my lab work soon so please any gals/guys help me.. i need c coding in expression tree... | |
hey guys i am struggling with this program since last three days..my compiler is showing "Your code has stopped its execution with a non-zero (failure) exit value.This is generally due to run time Exceptions like Memory Access Violation and Floating Point Exception. Please check your code for run time Exceptions … | |
Added just to help other.... [code=c] #include<stdio.h> #include<conio.h> #include<stdlib.h> #define Operator 1 #define notOperator 0 #define empty -1 void formatting(void); void getInput(void); int chkElement(char); void opFunc(char); void varFunc(char); void push(struct node*); struct node* pop(void); void dispTree(void); void infix(struct node*); void prefix(struct node*); void postfix(struct node*); char equation[25]; struct node* stack[25]; … | |
Hello here in k&r excerise of primitive calculator i get it and all but there something i think its weird and i don't somewhat get it here the getch and ungetch functions i don't get it's routine [code] #include <stdio.h> #include <stdlib.h> /* for atof() */ #include <ctype.h> #define MAXOP … | |
Every time I write a code using Visual Studio for my C++ class, I keep getting reference linking errors and I dont know how to fix it. I have attached the code and the error that I keep getting. [CODE]// Fig. 3.7: fig03_07.cpp 47 // Instantiating multiple objects of the … | |
Hey, In my duplicateWords function, I have been trying to figure out for a couple of hours how to [U]create[/U] duplicates for 4 different names in the list. Will someone help lead me in the right direction in how to complete this task? My program is reading in 50 words … | |
#include<stdio.h> #pragma pack(2) struct hai { char ch1; char ch2; char ch3; char ch4; char ch5; }s; int main() { printf("%d \n",sizeof(s)); return 0; } output : 5 while i changing the statemnt in 2nd line as #pragma pack(4) ,then both outputs are same. can u give me solutions ? | |
Hey all, Not sure if this is a C# or a XML question but i decided to post it here as i'm trying to use C# to update XML. I'm trying to update XML document Attributes from a XLS document. The XML documents are 1000's of lines long and there … | |
**** * *** and ** ** *** * **** well my teacher wont say a thing and have passed this act. now our teacher is a different one and i can't still figure it out.. help pls??... :S the only loop i know is this * ** *** **** =============================================== … | |
When the program is given a multicast address it should print the corresponding mac address, along with a list of the 32 overlapped multicast ip addresses. ./ipcalc.pl 224.1.1.1 255.255.255.255 Class D (Multicast) Address: 01-00-5e-01-01-01 Overlapped Addresses 224.1.1.1 224.129.1.1 225.1.1.1 225.129.1.1 226.1.1.1 226.129.1.1 227.1.1.1 227.129.1.1 228.1.1.1 228.129.1.1 229.1.1.1 229.129.1.1 230.1.1.1 230.129.1.1 … | |
am trying to make a timer circuit with the help of 89c52 micro controller. I have one assembly language program, but the programming kit supports only to C language. I want to translate assembly program to C program so that I can use it for the above mentioned micro controller. … | |
Hi, help me in completing my program. i dont get the logic how to make my program work for both the inputs. just compile and run will come to know the problem. this program is to create the infix tree for the given expression. if the expression is given completely … | |
I have been trying to do my project for the past 2 weeks but cannot think of any other ways to make it works. This is an important project to me if I want to get a passing grade in this class. So if anyone think they can help me … | |
Please tell me the major difference between the capital character with single inverted comma and double inverted comma in a C Program. | |
I want to develop a compiler which combines many of the concepts of OOPS as well as a structured language.... Is it worth using C for the development or should I use any other language..... and ofcourse I want to make it platform independent...... Is it possible in C I … | |
#include<stdio.h> main() { int a,x,y,z; clrscr(); printf("Select from the following operation:"); printf("1]Addtion"); printf("2]Subtraction"); printf("Enter your choice here:"); scanf("%i",&z); switch(z) { case 1: printf("Enter Num 1:") scanf("%i",&x); printf("Enter Num 2:") scanf("%i",&y); a=x+y; printf("%i + %i = %i",x,y,a); break; case 2: printf("Enter Num 1:") scanf("%i",&x); printf("Enter Num 2:") scanf("%i",&y); a=x-y; printf(" %i … | |
I dont know how to pass a value from the function [ICODE] total();[/ICODE] to [ICODE]main()[/ICODE]...i want get the value of the [ICODE]prod[/ICODE] and assign its value to bill...But this code i have will only redo the function [ICODE]total() [/ICODE]...Anyone can help please?. [ICODE]#include <stdio.h> #include <conio.h> int header(); int choices(int); … | |
Hi everyone, this is my first post on this forum. I've been browsing these boards for awhile and thought it would be a good idea to register now, for i hope someone can help me out :) I've created a program which enables a user to input numbers from 1 … | |
Am i writing the correct pseudocode? Im confuse in pseudocode for while statement. [CODE] Start declare variables; print “choose account types”; read choice; if choice = ‘a’ then while n<=3 print userid and password; read userid1 and password; a = strcmp(u,userid1); b = strcmp(p,password); if a = 0 and b … | |
A Fibonacci sequence is defined as follows the first and second terms in the sequence are 0 and 1 subsequent terms are found by adding the preceding two terms in the sequence write a c program to genera? | |
IS it possible to have text in the command line delimited by "" rather than white space? | |
how to make a program that has a menu and once you choose a certain topic then when your through with that how will you return to the previous menu that is under a certain condition like in a do while loop ?? can someoNe help me?? | |
sir can you give a an example of an nested menu code for c>>??<< i want to learn how a to make a program that will return to its menu after executing a choice on its list?? like this menu 1] addition 2]subtraction enter your choice: 1 enter num 1: … | |
hi all, I write this program under the C++ not C. But I heaively used the malloc() and free() functions in my code. In brief what my code does is just allocate memory for NFA transition table. It grows dynamically. When the number of transitions is a %4 then it … | |
i really need to know how to make a program that will never end and continue to repeat itself from the beginning... ^^!! | |
Plz tell me how can i delete a particular string from given file .... plz help .. I've no idea :( | |
I was wondering how I could use the graphics type effectively in C. I have seen games created in C. How is that practically possible? | |
Hi, I am doing network programming in C on Ubuntu using gcc. I am facing the problem how to convert an Integer Type to ASCII Type. I have used itoa() and sprintf(), but wasn't that fritful. Can any one suggest a suitable solution to it? ![]() | |
hey m a new user so didnt knw it... nywyas here's the program i made.. /*A PROGRAM TO SEARCH AN ELEMENT IN 1D ARRAY USING BINARY SEARCH USING ITERATION*/ #include<stdio.h> #include<conio.h> void binary(int array[],int n,int ele) { int beg=0; int end=n-1; int mid; mid=(beg+end)/2; while((beg<=end)&&(array[mid]!=ele)) { if(ele>array[mid]) beg=mid+1; else end=mid-1; … | |
Hi , finally i managed to write code for infix tree generation. but when i am getting segementation fault . when i debug the code its entering infinite loop. please review my code and kindly let me know wheres the problem. i am passing a file through command line and … | |
This Question is not programming related but rather important for all compiler related programming languages especially the Language C. what is portabily? since my graduation i have been taught C is not 100 % portable language. but i dint get any satisfactory answers for,not 100 % portable? where its lagging … | |
write a program which convert a given decimal number in to binary ,hexadecimal ,octal and write a function which will arrange a given string in alphabetical order | |
I've been trying to look up an answer to this online, before having to post it to the board. All I've managed to do with what little info I've dug up is to confuse myself. How does one go about accessing some sort of standard dictionary for C# (or .NET … | |
Can anyone help me to get the program code for printing the transpose of a matrix as output......pls help as soon as possible...... | |
The line fullpath = temp; doesn't actually reset the var. I am not sure what I have to do. I have tried fullpath = *temp;. Could someone tell me why this is not working? [CODE] #include "stdio.h" #include "stdlib.h" //Used for getenv(); #include "string.h" //Used for strcat(); int main(int argc, … | |
i have been trying to write code for creating an infix tree for the given [B]infix expression[/B]. but i struck at writting the procedure itself. suppose my expression is : a + b *c + d this is how the compiler evaluates [CODE]( ( a + ( b * c … | |
This program is (as you can see in the notation) a homework assignment I'm doing for class. I wrote the whole thing, which as far as I can tell right now is logically functional. It takes commands from a user and uses them to denote what happens to a linked … | |
if one thread stucks in "gets" command then it does not allow any other thread to printf any thiing. i have also tried scanf but the same result. what should i do. i want other threads to print on command line but they did not if one of the threads … | |
Please can you help me with writing the following C program : Write a program that accepts 10 integer store them in an array and determine the following: 1. sum 11. the average 111. highest 1v. lowest | |
[CODE]#include <stdio.h> #ifndef __CHARCODES__ #define __CHARCODES__ #define LETTER 1 #define NUMBER 2 #define SYMBOL 3 // sub-type codes #define VOWEL 4 #define CONSONANT 5 #define ODD 6 #define EVEN 7 #define UPPER_ASCII 8 #define LOWER_ASCII 9 #endif int main() { char keyStroke = 0; int typeCode = -1, subTypeCode = … | |
I need help in understanding how input file in C++ works. Here is what i need to do. I need to be able to open a input file called input.txt. That file will contain 15 numbers in a list format. 6 .34 74 34 12 31 23 . . . … | |
I am having some problems with writing a 2d array, then displaying it, and then showing the sum of all of the elements. A major part of this problem is that i nave to write three seperate functions to achieve this. it is supposed to do this: [QUOTE]For this exercise … |
The End.