15,552 Topics
| |
When a simple-escape-sequence like '\n' is evaluated, what would be the result? Is it ASCII 10? How I can show ASCII 10 as a character? Isn't it '\n' again? I am confused! Can someone please help me with the issue? | |
I want C program for Parse I and Parse II of an assembler...???* C code for parsing assembler for IBM 360 machine... * | |
> /* 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" … | |
#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 … | |
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; … | |
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 … | |
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() … | |
#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 … | |
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 … | |
**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); … | |
#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, … | |
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 … | |
#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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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; }; | |
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 … | |
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 … | |
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 … | |
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] | |
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 … | |
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 … | |
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 … | |
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 … | |
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) … | |
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 … |
The End.