15,550 Topics

Member Avatar for
Member Avatar for fuller

Hey guys , I need some help in writing a C code for a calendar problem. I need to write a code to find the day of the week if the month and year are entered by the user. Not able to get the logic for it. I need this …

Member Avatar for jnawrocki
0
107
Member Avatar for george61

This is a program for getting the sum of prime numbers of given range. The problem is that it would take hours if the limit is about 1000000. I've read about the sieve of Eratosten but having difficulties with implementing it. Could someone help to make this piece of code …

Member Avatar for WaltP
0
327
Member Avatar for virtue

I want to parse through a root folder which is entered by the user by using multi threading and multi processing at different versions.But how can I distinguish while I am parsing through a root folder whether the next is a folder or a file?To summarize I want to learn …

Member Avatar for Ancient Dragon
0
172
Member Avatar for b56r1

#include<stdio.h> main() { int a=10; printf("%d %d %d\n",a=10,a=20,a=30); } o/p: 10 10 10. Here, the latest value is updated and printed as the expression statements separated by commas in funtions are evaluted from right to left. But, in below program by using global variable or static variable why the updated …

Member Avatar for pheininger
0
109
Member Avatar for livingsword

hi, im a beginner. i hav an assignment on Pascal's triangle. i saw some post over the topic but couldnt get it to work with my code. heres what i have done so far.... [code=c] #include<stdio.h> #include<conio.h> void main() { int a[10][10]; int i,j,c,n; clrscr(); printf("Enter how many lines do …

Member Avatar for vipinkumar512
0
724
Member Avatar for winecoding

There is a code snippet [CODE]Int matchstar( char c, char *regexp, char *text) { Do { /* do sth */ } while (*text != ‘\0’ && { ‘text++ == c|| c == ‘.’}); Return 0; } [/CODE] I do not understand how does the logic in while work, in specific, …

Member Avatar for Ancient Dragon
0
109
Member Avatar for rjbrjb777

hello all, following is the code that fetches required columns from r.csv and makes a new file. now i want to ignore first line of r.csv while fetching defined column . what should be done? [CODE] #include <stdio.h> #include <stdlib.h> int main() { FILE *in, *out; char ch; char *rdf,*wdf; …

Member Avatar for rjbrjb777
0
2K
Member Avatar for rjbrjb777

hello, what book will you suggest me to read if i want to learn gui using c language.?

Member Avatar for rjbrjb777
0
94
Member Avatar for itsmylife

I have a question here.. i have 2 files with me list of usernames and a list of passwords i need to write a program to check each user name with the list of passwords. Then need to go to a website and see if it logs in. I am …

Member Avatar for Adak
0
76
Member Avatar for chester1908

Hey hombres. I feel a bit embarassed to ask something so simple,but i need help with qsort. As you will understand,im trying to sort my table made of "catPage" structs,which are read from keyboard,comparing the lName strings. First i print the struct array unsorted,then sorted,but what i see printed is …

Member Avatar for chester1908
0
559
Member Avatar for geoffy0404

so I want to take the totalPoints divide it by 850 then multiply it by 100 giving me a whole number, my problem is when i use my printf to display the new total it comes out at 0 or a number that i wasnt expecting. [CODE]totalPoints=grade1+grade2+grade3+grade4+midterm+attendence; printf("total points so …

Member Avatar for WaltP
0
130
Member Avatar for Incubator

How can i read some number from a text file and then go back to read some other information? All i know, is read it from the beginning to the end, but even when i check something for ex if(fgetc(in)!=...) goes forward one character, and all this messes up my …

Member Avatar for WaltP
0
147
Member Avatar for Soup!

Hello, I'm new with C and I've almost finished this little program but something is wrong. The program reads in a list of names from the file names.txt that I put right in C:, and prints the list to an out file called trans.txt (which it creates on its own) …

Member Avatar for jnawrocki
1
204
Member Avatar for slygoth

Hey can someone help me with a code to mask password. To print * when the user enter a value and when they hit backspace it takes back a *. Im having trouble figuring out the code

Member Avatar for Arbus
0
325
Member Avatar for ram619

Here the val should print the max number but its printing some address. When i tried to print while in loop, it printed the largest number but in the next line it again printed the address. please tell me whats wrong. Thanks [code=c]#include<stdio.h> #include<conio.h> int main() { int arr[5][5]={ 2,4,8,11,15, …

Member Avatar for ram619
0
123
Member Avatar for slygoth

I need some help with the toupper code. [code] int main() { char pick; printf("A. Local needs\n"); printf("B. Local Service\n"); scanf("%d",& pick); switch (pick) { case 'a': printf("Hello World"); case 'b': printf("Hello Nation"); } getch() return 0; } [/code] How would i implement the toupper code so i could change …

Member Avatar for jnawrocki
0
163
Member Avatar for ravish_26490

[B]I've tried out suggestions from several posts related to BGI Error (on daniweb n innumerable sites)but it just doesnt get solved.. Whenever i try to execute (after compiling successfully) a graphics program it either exits out of C and into DOS mode or it gives an error "The NTVDM comp …

Member Avatar for niran manandhar
0
1K
Member Avatar for lisha.ahuja

Hi Friends, -The current connector for accepting request to our existing system is written in C language,we had build a ".so" file by compiling c program using MF cobol. -Cobol application calls this ".so" files and passes the required buffer.The current data structure in our application is simple string. -Now …

0
43
Member Avatar for aeinstein

Hi All, Just starting my online C programming class and my textbook states "In a computer language, a token is the smallest unit of the language that has a unique meaning. Thus, the reserved words, programmer-created identifiers, and all special mathematical symbols, such as + and -, are considered tokens …

Member Avatar for aeinstein
0
187
Member Avatar for Ajinkyanaik
Member Avatar for TrancededTora

How to write a structure that set a countdown of days at 30. After which the days have expired, produces an indicator?

Member Avatar for Banfa
0
41
Member Avatar for mukorera

Can somebody please help me with the c code for monitoring System power,that is how to check if a pc or laptop is running on power or battery

Member Avatar for mukorera
0
77
Member Avatar for ejiroy

I am trying to make a program that will read in a text file and count the number of words that have a certain length from 1 to 20. So it should count the words that have a length of one, two, etc., and print it out. I have been …

Member Avatar for nezachem
0
106
Member Avatar for antichix

hEy pLz sOlve this pRobLem pls?. .Enter the grade of ten students and will display the number of students who passed and failed granting a passing score of 75 and above.

Member Avatar for Adak
-1
198
Member Avatar for papackologne

To be honest i really don't know where to start or what should I. The problem states, "Given the vertex pairs associated to the edges of an undirected graph, find the degree of each vertex." I.e. (A square has 4 vertex then the degree of each vertex is 2.) It …

Member Avatar for WolfPack
0
229
Member Avatar for cutedipti

Hi, When we define any integer array like int a[3]={1,2,3}; then it will assign the values as a[0]=1, a[1]=2, and a[2]=3 But, when we define any character array as char a[3]={'a','b'}; then compiler here automatically consider '\0' null character to represent the end of the string So, my question here …

Member Avatar for gerard4143
0
272
Member Avatar for derek123

Hi Guys, I was wondering how one would write a C program that calculates the value of a cosine function without using any library functions from <math.h> I need the outputs to turn out like this Case 1: cos(-1.000) = 0.540302303792 Case 2: cos(1.000) = 0.540302303792 Case 3: cos(1.500) = …

Member Avatar for Ezzaral
0
147
Member Avatar for derek123

I am really trying to pass this class, and am simply struggling majorly with C, I need help with these 3 problems that are due today by midnight, please help, will appreciate it greatly, and even pay if thats what it takes. I did problem 1, but used math.h, which …

Member Avatar for Ezzaral
-1
584
Member Avatar for hantuapi

[CODE]#include<stdio.h> #include<string.h> #include<conio.h> struct menuItemType { char menuItem[15]; double menuPrice; } menuList[]= {"Plain Egg",2.50, "Bacon and Egg",3.45, "Muffin",2.20, "French Toast",2.95, "Fruit Basket",3.45, "Cereal",0.70, "Coffee",1.50, "Tea",1.80 },order[10]; void getData(struct menuItemType[],struct menuItemType[],int*); void showMenu(struct menuItemType[],int); void printCheck(struct menuItemType[],int ); int main() { int items = 0; printf("Welcome to HiFi's Restaurant\n"); printf("\n"); printf("******* …

Member Avatar for chrjs
0
123
Member Avatar for shantanusinghal

[CODE=c] int main(int argc, char *argv[]) { ifstream inHandle; Assembler obj; if(argc!=2) { cout<<"InvalidInput ERROR"; } else { inHandle.open("test.asm"); if(inHandle==0) cout<<"FileNotFound ERROR"; else obj.pass1(inHandle); } inHandle.close(); return 0; } [/CODE] this is my code for the main() function, i have tried entering the filename in every possible format but the …

Member Avatar for Narue
0
633

The End.