15,552 Topics

Member Avatar for
Member Avatar for jksdua

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 …

Member Avatar for jephthah
1
131
Member Avatar for gagansaini599

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 …

Member Avatar for Fbody
0
118
Member Avatar for rend

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 …

Member Avatar for jephthah
-2
76
Member Avatar for zyx

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 …

Member Avatar for Salem
0
147
Member Avatar for jsphb9000

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, …

Member Avatar for gerard4143
0
266
Member Avatar for emmas4impact

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 …

Member Avatar for Adak
0
132
Member Avatar for OzY360

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 …

Member Avatar for OzY360
-1
204
Member Avatar for scarypajamas

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] …

Member Avatar for scarypajamas
0
105
Member Avatar for manju_b_2006
Member Avatar for Adak
-2
589
Member Avatar for rlhh

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 …

Member Avatar for Adak
0
167
Member Avatar for overRun

[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 …

Member Avatar for Salem
0
81
Member Avatar for ayushky

sir i want to lock with password protection to my '.c' files.how i can do that. please suggest sir. thanks

Member Avatar for Ancient Dragon
0
259
Member Avatar for bittu1028

hello i m doing c project on digital clock. i dont where do i start from i m not so confident

Member Avatar for Ancient Dragon
-1
91
Member Avatar for d34dw4rd

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 …

Member Avatar for abhimanipal
0
124
Member Avatar for ruigrandaorocha

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: …

Member Avatar for ruigrandaorocha
0
187
Member Avatar for HiHe
Member Avatar for HiHe
0
115
Member Avatar for tskellyfla

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 …

Member Avatar for jonsca
0
189
Member Avatar for ahmed hefnawy

[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]==')') { …

Member Avatar for abhimanipal
0
200
Member Avatar for tomtetlaw
0
52
Member Avatar for mariosbikos

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 …

Member Avatar for Adak
0
111
Member Avatar for Griff0527

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 …

Member Avatar for Griff0527
0
8K
Member Avatar for rlhh

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 …

Member Avatar for abhimanipal
0
135
Member Avatar for manutd4life

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 = …

Member Avatar for manutd4life
0
169
Member Avatar for lionaneesh

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.

Member Avatar for jephthah
0
143
Member Avatar for idlackage

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 …

Member Avatar for jephthah
0
135
Member Avatar for mtech91

/*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 …

Member Avatar for Fbody
0
257
Member Avatar for arvin2006

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 …

Member Avatar for maddy10988
1
248
Member Avatar for yunmin

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]

Member Avatar for min467200
-1
53
Member Avatar for mariosbikos

[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 …

Member Avatar for mariosbikos
0
267
Member Avatar for SHENGTON

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 …

Member Avatar for vsiddharthv
0
916

The End.