15,551 Topics
| |
write a function begins(string1, string2) that reurns true if string1 begins string2. Write a program to test the function. program: #include<stdio.h> #include<string.h> char begins(char sentence1[],char sentence2[]) { int i,j=0; for(i=0;sentence1[i]!='\0';++i) { if(sentence1[i]==sentence2[i]) j=j+1; else if(j==i) printf("True\n"); } return(0); } int main() { int i, j=0; char string1[100],string2[100]; printf("Enter a sentence:\n"); … | |
I am getting a -NaN message and I don't understand why? The program so far compiles okay. But prints "the value of lat1 is -NaN." Any help would be greatly appreciated. # include<stdio.h> # include<math.h> float get_lat1(); int main (void) { float lat1; get_lat1(); printf("the value of lat1 is %f … | |
I gotta write a program that reads a file and determines a customers priority number. The program then builds a priority queue using hte priority number and prints the list of people waiting. Here is what I have so far int main() { int myValue[3][3]; myValue[0][0] = 53,000; myValue[0][1] = … | |
[B]Is it possible to convert from VB code to C and what is the best way to do this?[/B] | |
thank you for your replies but, I can't open the program. program doesn't work. If you have any different ideas please contact me. thanks.... | |
Hi can any one help me with the code to reverse 2 strings with [B]unequal[/B] number of characters in them...read the first line and secondline relpace the second line with reversd first line...and replace first half with reversed second line... thanks, zoey | |
I'm suppose to execute the program in cmd prompt like this: fifo.exe data.txt However, I cannpt even get the program name which is fifo.exe. I found out that argc (parameter of main) does not even go to 1. It shows -1 instead. Why is this so? Anyone can help me?!?! … | |
:( ...hello there..currently i am doing the serial communication between my Vb at comm 1 with my PICDEM 2 PLUS BOARD..so i manage to send my data to the board to light up the LED but the data i send back by the board to VB that is "ok" to … | |
hi!do you know how to make a program in C that can run the "*" 1.from left to rith? or 2.from rigth to left? 3.up to down? 4.down to up? 5.combination of all... pls...pls...pls....pls...help me.. :sad: | |
i havent been able to find anyone to help me .... i am looking to create a queue .... i cant use a stack, as that is LIFO (last in, first out) ... but i need a FIFO (first in, first out) .... i have some code for a stack … | |
Hi! I had 1 problem in C, now I have another one. :o Please bear with me. I am learning the C language. Please run the following calculation in a scientific calculator. When the "=" sign is shown at the end of the calculation, be sure to press the = … | |
Hi, I get this message when the program shold exit the main function. I think that the problam could be in that function (that is being called from main): void scanFileToMat( ifstream mFile,int arr[43][43]) { string m ,s; int pos; double sign; int col, value; getline(mFile,m,')'); while(!mFile.eof()) { mFile>>sign; arr[numSV][42]=sign>0; … | |
I have to write an algorithm that decides if two structs are structurally equivalent. This is more theory that real programming so pseudo-code in something that sort of looks like C would be fine. Basically I have to compare scalers, arrays, pointers, and structs. So if anyone can provide any … | |
I have a lab to create a loop to determine the positive divisors of an interger and then determine if the interger is a perfect,deficient, etc. I am having trouble determining how to write the statement to determine the divisors of the numbers. I believe the % operator is used. … | |
[FONT=Arial]undefined[/FONT]how to make a program than can run the "*" 1.from left to right 2.right to left 3.up to down 4.down to up? 5.combination of all.... pls... help me... :-| | |
The program to compute the area and perimeter of an arbitrary triangle using the formula: Area=sqrt[(s)*(s-a)*(s-b)*(s-c)] where a,band c are lengths of sides ands is the semi perimeter. s=(a+b+c)/2. I m making a lot of errors where i dont know what to do. | |
I,ve been on this page for only a week, and I got help from some one that took it upon Himself to go way beyond to help Me, His Name is clartsonly on on DaniWeb.His Rep is a lot high than what it is and if I had it my … | |
Hi, I have to complete a project as the part of my curriculam. The Title is[b] "INTELLECTUAL PROPERTY & HUMAN RESOURCE EXPERTISE DATABASE FOR A SOFTWARE COMPANY"[/b]. If anybody knows nything abt this then pl let me know. I want to know the how should I integrate 2 topics IP … | |
hi all , i have to create an ellispe the inputs are major axis , minor axis , and the angle of the major axis the ellipse needs to be tilted. thanks aviral | |
need to do the conversion as said above. eg. "one thousand five hundred" --> 1500 1500-->"one thousand five hundred" upto billion.. tried using this logic.. separate billion, million, thousnd, units..made std fn fn_conv(){ convert to hundredth place.. then store to var.. million, billion ..} then print in format.. ("%d,%d,%d,%d",billion,million,thousnd,units); but … | |
I want the user to use the four cursors up,down,right,left. i tried to use getch() but it didnt work because the four have the same ASCII code which is 224, so i cant diffrentiate between them plz any one tell me how to make the user use them aam and … | |
online address book to keep track of names, addresses, phone numbers, and date of births of family, friends and business associates. the program should be able to handle any amount of entries by using linked list and pointers. :rolleyes: | |
My program is reading the last line of data from an infile twice. When I execute the program, the last line of data is being displayed twice. Please Help! | |
I'm having problem writing code for a program that estimates the value of the mathematical constant e by using this formula e= 1 + 1/1! + 1/2!... I just cant get this to work. Can someone please help | |
NEED some one to help me Access a Primary Key in SQL for MS, with the primary Key Being ST with a AutoNumbering of 23, HOW can I :cry: ? SEE code from YESTERDAY Chester1 at 09-28-2004-05:02pm.Thanks for the help! | |
#define ENDFILE "CTRL-Z" this end the file whenever the user enter CTRL-Z what i need, i want the user 2 enter CTRL-X to end the program #define ........ "CTRL-X" ( what could i write here) so the program end whenever the user press CTRL-X | |
Need HELP! This Program that accesses a data base will not print out information from Data Base.I think the Problem is in the SELECT statement.The Primary Key is ID1, I want to Access Primary Key 2, Field Father but when I run it, it will only print out Quote: " … | |
i am new on file(c) if i copy fscanf(nom du file,"%d",&a); from where i want copy th value of a plz send for me a example use fscanf plzzzzzzzz realy i need help :cry: :cry: | |
Hi guys, itz my that projectile game in C which used to be in code snippets sections. Well, as u can see no one was able to compile it and as a consequence it's been thrown out of the snippets :rolleyes: Well, here is the complete program, no codes -- … |
The End.