15,551 Topics

Member Avatar for
Member Avatar for onkarpathak833

I want C program for Parse I and Parse II of an assembler...???* C code for parsing assembler for IBM 360 machine... *

Member Avatar for deceptikon
-1
81
Member Avatar for faysal.ishtiaq

> /* This code works when the added chracter's value is less than or equal to 9. I mean when there is a carry,what will i do to print that. And there should not be used any library function. Run the program and you will understand clearly. */ #include "stdafx.h" …

Member Avatar for ken_taiken
0
137
Member Avatar for apanimesh061

#include <stdio.h> #include <conio.h> #include <stdlib.h> #include <process.h> #include <string.h> #include <math.h> int count = 0; typedef struct bitmap24 { unsigned char header[54]; unsigned char* pixels; }BMP; void readBMP (char* filename) { int i; FILE* f = fopen(filename, "rb"); FILE* f1 = fopen("save.bmp", "wb"); FILE* pixelVals = fopen("vals.dat", "w"); unsigned …

Member Avatar for Adak
0
535
Member Avatar for gunjan.vora.9

I'm writing a program to multiply two 4-bit number using add and shift method in C language. The code is as follows: #include <stdio.h> #include <math.h> int main() { int d,p=0, y=1010, x=1101, c, i; for(i=0;i<=3;i++) { c = x % 10; y = y << i; d = c*y; …

Member Avatar for Tumlee
0
147
Member Avatar for strizh

I'm having problem with passing argument to the linked list. I wait for user input then I parse this user input and put parsed tokens into dynamic array (char **c) After that I need to write ceratin user input into linked list (for example I need to pass c[1] to …

0
133
Member Avatar for swiss21

PROBLEMS 1.AFTER INPUT IN PHILHEALTH CONTRIBUTION PROGRAM CRUSHES. 2.AFTER INPUT Y or y in delete employee data PROGRAM CRUSHES. 3.AFTER REGISTER EMPLOYEE AND GOING TO VIEW EMPLOYEE PROGRAM CRUSHES. SAME ERROR A WINDOW WILL POP UP AND IT LIKE THE WINDOWS ERROR. #include <stdio.h> #include <string.h> int InformaticsPayrollSystemMenu(); int main() …

Member Avatar for Ancient Dragon
-1
194
Member Avatar for swiss21

#include <stdio.h> #include <string.h> int InformaticsPayrollSystemMenu(); int main() { char fname[100],lname[100],sex[100],con[100],dob[100],ans; int empnum[100],pay[100],payrollSystemMenuChoice,choice,emp,edit; int i=0,found=0; float rate,week,weekyear,ot,abs,weeksal,monthsal,annal,sss,pagibig,phl,tax,netpay; system ("color 0A"); system("title INFORMATICS PAYROLL SYSTEM"); do { payrollSystemMenuChoice = InformaticsPayrollSystemMenu(); switch(payrollSystemMenuChoice) { case 1: { found = 1; printf("\n\t\t******************************************"); printf("\n\t\t********* REGISTER NEW EMPLOYEE **********"); printf("\n\t\t******************************************"); printf("\n\t\tNOTE:Please fill up the form properly …

Member Avatar for Adak
0
205
Member Avatar for dendenny01

As for my assignment I had to write a program to swap 2 digit number Example:- If user input 12 the swaped number Would be 21. Along with ALgorithm, and a short description on this program(As how will you solve this program or what measure you'll take to get desired …

Member Avatar for tux4life
0
4K
Member Avatar for salty11

**I have this timeissorted.c file, and right now it's running at around about 8397599 usec. I'm looking for help toward improving the performance of this code to make it run faster.** #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <stdlib.h> static struct timeval start_ts, end_ts, diff_ts; void startClock() { gettimeofday(&start_ts, 0); …

Member Avatar for salty11
0
208
Member Avatar for swiss21

#include <stdio.h> #include <stdlib.h> #include <string.h> #include <conio.h> int main() { printf("\t//*****************St.Jago High School******************\\ \n\n"); printf("\t------------Courtney Athlone St.Michael Reid---------------\n\n"); printf("\t^^^^^^^^^Computer Science IA-Pay Roll System^^^^^^^^^\n\n"); char fname[50]; char lname[20]; printf("Enter the employee's First Name:\n"); scanf("%s",&fname[50]); printf("Enter the employee's Last Name:\n"); scanf("%s",&lname[20]); } int add_hours() { printf("\t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); printf("\t^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); int hours; int mo, …

Member Avatar for zeroliken
0
159
Member Avatar for numbplum

Hi there, I'm currently working on a project that requires for me to print out data about a hexadecimal. It needs to print out signBit, expBit, and fracBits. I have tried to look onine but I haven't had any luck finding something useful. These are the requirements: Your code will …

Member Avatar for deceptikon
0
290
Member Avatar for swiss21

#include <stdio.h> #include <float.h> float grosssalarycalc(float value1,float value2){ float gsalary; gsalary=value1+value2; return (gsalary); } float ovtmpayoutcalc(float value1){ float ovtmpayout; ovtmpayout=25*value1; return (ovtmpayout); } float netpayoutcalc(float value1){ float netsalary; netsalary=value1-(value1*0.20); return (netsalary); } int main() { char name[32]; float ovtmpayout0,gross,net,ovtmhrs,salary; printf("Payroll Calculation Program\n"); printf("Employee, please enter your name:\n"); scanf("%s", name); printf("Employee, …

Member Avatar for ram619
0
143
Member Avatar for erwiali

Please! i need help on this . it suppose to cut the original linklist of head hp such that the sumM <=m and sumV <=v . this is part of a program that reads an input file of itemsets where each item has cod volume mass . then you key …

0
68
Member Avatar for fyra

Hi people. I have a remove function that should set a hide member of a node to 1 instead of actually remove the node. The function works well when I insert and remove top and tap respectively (both nodes have their hide member set to 1) but when I insert …

0
155
Member Avatar for fyra

Hi everyone. I'm tying to understand the instruction below. I wish someone could explain me what it means: tree->destroy(((AvlNode*)(*position)->data)->data); // destroy the left branch of the binary search tree starting from the specified node static void destroy_left(BisTree* tree, BiTreeNode* node) { BiTreeNode **position; // can't remove from an empty tree …

Member Avatar for Nutster
0
372
Member Avatar for anumash

I have Dev-C++ as an IDE and MinGW as the compiler, and I am running C programs on the IDE. I have this project where I have to write raw PCM data (unsigned 8-bit i.e bytes of PCM) as an array. I have figured out the reading part but when …

Member Avatar for Moschops
0
136
Member Avatar for varun51

Hi, Can somebody write a sample code to reverse a string using recursion. Basically a function which takes string as input parameter, reverses the string using recusrion and returns back the reversed string to calling function. Thank you Naveen

Member Avatar for Amangpt01
0
2K
Member Avatar for nah094020

I cant figure why my program is not running it compiles with no errors but doesnt run, am bearly starting to learn c , am more proefficient in java but its wierd changing, i use vi to write my code. heres a snipet #include <stdio.h> #include <stdlib.h> #include <time.h> #include …

Member Avatar for Ancient Dragon
0
156
Member Avatar for suren3

How to store the elements and display?? struct A{ int level; char name[20]; struct b *a_b; }*d[3]; struct b { char name[20]; struct b *next; };

Member Avatar for akashgupta1990
0
153
Member Avatar for Nutster

Recently, I saw somebody start a "Deal or No Deal" game in the Posting Games section. This got me thinking of writing a program to actually play the game based on the rules of the show. So I spent a couple of hours writing this in ANSI-C. I probably should …

Member Avatar for Nutster
0
327
Member Avatar for anumash

I recently wrote a program to determine my current working directory using getcwd(). getcwd() returns the starting address of the character array supplied by the programmer. I have written a very simple program and as I am not an experienced C program can anyone mention what I can do to …

Member Avatar for deceptikon
0
104
Member Avatar for ChicagoBears2012

Basically I'm supposed to make a program that copies the Unix -wc command. Flags -l, -w, -c, and -L are supposed to display # of lines, # of words, # of characters, and # of characters in line, respectively. I am having trouble reading in a text file (first time …

Member Avatar for ChicagoBears2012
0
113
Member Avatar for akhilchandranms

hai , I am using turbo c compiler, the system() function always return -1. i can't run any dos command using system() function i can't use system() properly please help me !!! ex: [CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> void main() { int i ; i=system("dir"); printf("%d",i); getch(); } [/CODE]

Member Avatar for deceptikon
0
1K
Member Avatar for somjit{}

this is an exam question i failed to answer properly, im trying to work it out. the code i came up with is below, it works ok, but i was hoping if anyone could help in improving it. iv read in various threads in daniweb itself about making a code …

Member Avatar for Adak
0
290
Member Avatar for samii1017

I'm working on a horse race. So in my program, a random number is produced. This random number can be 1 through 100. If the random number is 1-35, then horse one will be the winner. If the random number is 36-47, then horse two will be the winner. It …

Member Avatar for deceptikon
0
113
Member Avatar for anumash

I was wondering how the compiler searches for a file using just the name of the particular file. The function argument that should be supplied is the file name in double quotes and mode i.e. read, write etc. What if there are two files of the same name but in …

Member Avatar for anumash
0
162
Member Avatar for samii1017

So, I have to allow a user to enter numbers into an array. I then have to store that array in a text file and a binary file. How would I go about doing this? I have the array part of it down, it's just storing the array into the …

Member Avatar for Lucaci Andrew
0
82
Member Avatar for yossi.hazan.5

im keep getting ror: expected identifier or '(' before '.' token|error: expected expression before what am i doing wrong? #include <stdio.h> #include <conio.h> #include <stdint.h> int main() { typedef struct { char name[20]; char year[20]; int inout[20]; }movie_rent; movie_rent[20]; int i,sum=0; FILE *myfile; if ((myfile = fopen("mov.txt", "rt")) == NULL) …

Member Avatar for yossi.hazan.5
0
116
Member Avatar for somjit{}

this code gives the correct result upto size 6 (i'v run this a few times, and 6 seems to be the boundary), although the intermediate steps are all insane! then onwards, from size 7, it returns minimum value 0 /*minimum of an array using recursion*/ #include<stdio.h> #include<stdlib.h> int findMin(int* arr,int …

Member Avatar for somjit{}
0
361
Member Avatar for aasked

I am trying to copy the column, from bottom to top element,to the row , but it does not work. Plase help #include <stdio.h> int main () { int Image1[3][3]={{1,2,3},{4,5,6},{7,8,9}}; int Image2[3][3]; int i= 3; int j =3; int k =0 ; int l; while ( k <= 0){ i=0; …

Member Avatar for nullptr
0
86

The End.