15,552 Topics
| |
Im doing my project on number conversion. I found the coding below. can anyone help me to explain the coding. why the coding have "count"? why the "count + 1"? what function of "count"? [CODE]void Bin2Dec() { long int a[20],i,n,count=0,b[20],c[20],sum=0; printf("\n Enter a binary number to convert to decimal form:"); … | |
Hi friends I need urgent help. now three variables we printed to a file received from the user. This variable to another file, the user wants to take that file and the value of the variable is a variable, you need to do. And this event is the first change … | |
Im currently trying to delete a record from a file The structure ive used is this: [code]struct studentRecord { char rollnumber[12]; char name[32]; int attendancePercentage; float quiz; float assignment; int classpart; float mid1; float mid2; float final; float semesterPerformance; float overallPerformance; }; [/code] Now I have 2 problems: 1.I cant … | |
Write a program that converts upper case to lower or lower case to upper, depending on the name it is invoked with, as found in argv[0]. | |
hi guys, sorry to disturb but I'm looking for the instructor's manual to 'C by a modern approach' written by KN king. | |
How would I hide keystokes when I use the keyboard? When you use scanf fgets and gets, they show they print the keys to the screen.. I want to hide them. | |
Hi, first of all: the answer to my question is NOT atof()! I have a char-array that may contain something like "1.2345". I want to convert the contained values to float/doubles but unfortunately atof() depends on the current locale. So whenever a user executes the application on a system where … | |
I need to create a simple http client to a web server and my code is the following: [CODE]#include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <errno.h> #include <arpa/inet.h> struct sockaddr_in wserver, cl; struct hostent *rem; int fd, newfd, len, l; int main(int argc, char … | |
Hello! I'm making an IRC Client with DCC Capabilities. The DCC Specifications say this about receiving files: [b] The recipient should acknowledge each packet by transmitting the total number of bytes received as an unsigned, 4 byte integer in network byte order.[/b] In do this with the following code: [code]typedef … | |
how to find the position of a particular character in a given string in c | |
i dont have idea what string function must be used to find consecutive characters . example is the word commit it will output the letter m . tnx for th help :D | |
Say, i want to create a file compressor-extractor(using C programming language). When the file is compressed, it has the extension ".jisan" ... is there any way that when i double click on the compressed file(example: file.jisan), it will extract itself automatically? | |
I am currently trying to write a program to simply output roman numerals (not convert-as on many previous threads) from 1-99.. This is the logic/code I have tried so far, but I am certain that it isn't correct apart from the fact that it isnt compiling. [CODE]#include<stdio.h> int main(void) { … | |
The 'who' command lists the "console" associated with the user. Im trying to find all open "tty's or whatever that users' device console is called". The only open source for the tty command i found, which was written by apple, was not followable. Question is is their a function call … | |
Hi the aim of my program is to allow a user to enter the size of an array and then allows the user to enter the values into an array. The bit im having a problem with is I want to count how many odd and even numbers there are … | |
Hello, I am trying to use the allegro game library (5.05) and I came across an error. It involved not being able to find -lgcc_eh so I switched it to static-lgcc_eh and it worked fine, that is until I got an error for not finding allegro-5.0.5-mt.dll . I looked in … | |
int a=320; char *p; p=(char *)&a; printf("%d",*p); gives 64\\\not sureif p or *p in pf wat in the world does (char *)&a does ?? sum1 help plzzzz | |
hello guys grade book *write a program that will calculate the average of an unknown number of students. *your program should validate the grades to be between 0 and 100. *there are 5 grades to be entered and averaged . *the program should enter the grades using a for loop … | |
[CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> void Board(); void PlayerX(); void PlayerO(); void Player_win(); void check(); int win=0,wrong_X=0,wrong_O=0,chk=0; char name_X[30]; char name_O[30]; int pos_for_X[3][3]; int pos_for_O[3][3]; int pos_marked[3][3]; void exit(int status); void main() { int i,ch,j; char ans; /* clrscr(); printf("\n\t\t\t\tTIC TAC TOE"); printf("\n\t\t\t\t"); for(i=1;i<=11;i++) { delay(10000); printf("*"); }*/ do { clrscr(); printf("\n\t\t\t\tTIC … | |
Hi, This is the first time ever I post something about any programming language. Im just starting this semester with C language, so Im really new on this. This C code is a project we have for the class. We have to supply definitions for different functions. I have gone … | |
i am trying to send a file between a client and a server using sockets in C....well i see that there is a function sendfile(), but i donno its usage, can someone guide me with an example how to send a file and receive it..... | |
can anyone give me the program for pointer as function arguments.... thanks in advance | |
how to read a file name like 01JUN2009_tsea_360x181.dat | |
any other method by which i can pass variable no. of arguments to a function :) | |
hi, i am working on a code it has two parts: for the first part i have 1500-4000 text files which have strings in them.some files are same and some have different strings and i have to find amongst those a subset of files which are 10-20 n number and … | |
anyone can tell me what this line does? [CODE]return ('A' + c1 - 'a'); [/CODE] its in this function.. [CODE]char LToU(char c1) { if ((c1 >= 'a') && (c1 <= 'z')) return ('A' + c1 - 'a'); return(c1); } [/CODE] | |
I've been working on a program that inverts a word and changes the vowels in the word into an asterisk.. I'm confused on where to put the strset in my code.. can someone teach me how to? thanks.. Here's my code.. I know it's simple but I'm just a beginner … | |
how to delete a node...u just have a pointer to tat random node ...no head node info... | |
I need to write a quiz program that generates random questions. My group and I determined that we would probably need to make use of the random function, so we did our research and were able to write the following program [CODE] #include<stdio.h> #include<stdlib.h> int main() { int i; int … | |
hey everyone on Daniweb, I'm liuhh00 in need of some dire suggestions for my program. I can't seem to solve why my program is not working right after i select my choice for case. The program is suppose to accept any 20 random integers, store them and allow the user … |
The End.