15,552 Topics
| |
Hey, I am new here. I just started coding in C a couple of weeks ago. I am trying to create a simple program to input data into an array using a text file with 10 records. However, the array length is 16 and a couple of records in the … | |
hey plz can anyone do this for me Task-1: 1. Write a C code that takes a file as input. Say input.txt which has the information about the object to be transformed, type of transformation, etc. 2. Input file can have following different formats. Case 1: P # first line … | |
hay!!! please can Write a program that accepts as input a date in the form, MM-DD-YYYY, where MM represents the month of the year, DD represents the day within the month and YYYY represents the century and year. After input of the date, display the date in textual format and … | |
Hey guys, i'm having trouble with having to simulate a user entered number of parties and user entered number of guests. I am supposed to have a function with the prototype int party(int n) that will simulate one group at a time with n guests. I have to assign each … | |
Hi, I just started taking a programming class and am having trouble figuring out why this wont program wont work correctly. The user inputs their coordinates and the program returns whether it is in quadrants 1,2,3,4 or on an axis or the origin. [code=c]#include <stdio.h> int main(void) { double xcoord, … | |
hello everyone, I wrote some code on binary search in algorithms using c but here is my problem: [CODE] #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include <ctype.h> /* TASK: Demo about static, linear data handling. Four basic operations are exercised: 1) find 2) insert … | |
| I got this code from a book and it doesn't seem to work. I've triple checked for common mistakes and syntax errors but can't find any. Please tell me where I am going wrong. #include <pthread.h> #include <stdio.h> #define NUM_THREADS 5 int main(int argc, char *argv[]){ int i, scope; pthread_t … |
Maybe you could help me with the following code... [CODE=c] int main() { char foo = '?'; // foo is created on the stack. char* bar = "Hello World"; // where is bar created? // will the following result as a NOP or undefined behavior? free(bar); return 0; } [/CODE] … | |
help me how to download turbo c , and how to open . and how to start. | |
After a lot of trial & errors, I've managed to create an array as follow : xxx xxx xxx xxx 000 000 xxx 000 000 x00 000 000 x00 000 000 x00 000 000 x00 000 000 x00 000 000 x00 000 000 Now, when a user enters a value … | |
[CODE] typedef struct grid Grid; struct grid{ char grid[MAX_ROW][MAX_COL]; } void storeGrid(Grid *store_grid,int row, int col){ Grid *store_grid; store_grid = (Grid)malloc(sizeof(Grid)); //Grid storeGrid; //int grid[MAX_ROW][MAX_COL]; int rowNum, colNum; for(rowNum = 0; rowNum <= row; rowNum++){ for(colNum = 0;colNum < col; colNum++){ store_grid->grid[rowNum - 1][colNum] = 'a'; } } // Calls … | |
sir i want to lock with password protection to my '.c' files.how i can do that. please suggest sir. thanks | |
hello i m doing c project on digital clock. i dont where do i start from i m not so confident | |
Hi I'm writing a menu driven array with 50 randomly generated integers. In the program I am suppose to search for numbers in the array and print the number and location of the number in the array. I have most of the program finished, however when I input an incorrect … | |
Hi, so i was told that i could use the scanf() function, validating it with a space, instead of an "ENTER". [CODE] scanf ( "% [^] d", & a); [/CODE] The person told me to use that. I couldn't get it working. Do you know what is wrong? Extra info: … | |
Hi, I'm a student just learning c. I have an assignment that is killing me. I have to write a code that will produce the angle of a clocks hands. This is my third assignment I have done the 'hello' and calculated miles to feet and converted fahrenheit to celsius … | |
[CODE]#include"stdio.h" #include"string.h" #include"math.h" #include"stdlib.h" void convlute(char s1[20],char s2[20]) { int i,p=0,t=0; char s3[20]; for(i=0;i<20;i++) { if(s1[i]!='+'&&s1[i]!='-'&&s1[i]!='*'&&s1[i]!='/'&&s1[i]!='('&&s1[i]!=')') { s2[p]=s1[i]; p++; } else if(s1[i]='(') { t++; } else if(s1[i]=='+'||s1[i]=='-') { if(s3[t]=='*'||s3[t]=='/') { s2[p]=s3[t]; s3[t]=s1[i]; t++; p++; } else { s3[t]=s1[i]; t++; } } else if(s1[i]=='*'||s1[i]=='/') { s2[p]=s1[i]; p++; } else if(s1[i]==')') { … | |
hi i want to know how exactly can i use time.h and rand() if i want to print every time a pair of numbers but the same pair will be printed only once for example: 2 2 2 3 1 4 3 5 2 2<----- not to happen(instead get a … | |
| I'm new to C Programming ( 6th week of an 8 week course ) and I am working on user defined structures. I have created a structure to store data received from a file and three of the four sub functions planned: open the file, store the data in the … |
I'm trying to print an array of 3x3 and placing random numbers within them that has no repetition. I think what I did was right but there just isn't any output. I know I can easily get the answer somewhere but I would like to know what is wrong with … | |
here's my question: write a program that asks the user to type the value of N and writes this picture : N=1 * N=2 ** * N=3 *** ** * here's my work: [code=c]#include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int numOfStars = 0; int count = … | |
Sir/Maam, I am a newbie programmer in C and learning C since 6 months and am looking forward to learn Socket programming in C . I have some knowledge about TCP/IP and OSI model. Please suggest me some simple links and ebooks . Thanks. | |
The number I'm looking for is valid when it's positive, and nine digits. I used ( (value >= 100000000) && (value <= 999999999) ) first, which worked okay, but did not account for leading zeroes. How do I validate a nine digit number, using only math and no functions, with … | |
/*Hello, I am to create a program that gets a character and if it is uppercase, convert it to lowercase, if it is numeric print an error. I wrote the following code but my problem is that when I ask the user if he/she would like to quit, and I … | |
hello there everyone!! is there anyone who can help me to start creating an operating system. i don't have any idea on to start. i understand c language, but i dont have enough knowledge for such process. all i need is the simple concept or the simple/basic code for creating … | |
for the zigbee in c language, after i sent the data to router, what coding can i use to get the node id or node address of end device? anyone know the answer?? pls sent to my hotmail.. thk [I]<<snip>>[/I] | |
[CODE]#include <stdlib.h> #include <stdio.h> #include <time.h> #define MAX_ROWS 10 #define MAX_COLS 10 void sin1(char *map); int main(void) { system("chcp 1253 >nul "); FILE *fileptr; char myColchar,apantisi,map[MAX_ROWS][MAX_COLS]; int apotelesma,myColnum=1,myrow=1,k,a,l,c,row, col; char r,fileRow[MAX_COLS + 2]; // account for newline and NULL printf("dose tin diataksi me ton arithmo pou epithymeis(1/2): \n"); scanf("%d",&k);//edo tha … | |
Good day DaniWeb experts. This is my first post here and hope you can help me with my problem. I'm a noob with Borand C++. I see a tutorial here "[url=http://www.dreamincode.net/forums/showtopic37428.htm]Converting and Evaluating Infix, Postfix and Prefix Expressions in C[/url]". I copied the code and run it in my Borland … |
The End.