15,552 Topics

Member Avatar for
Member Avatar for Exsiss

I am currently trying to write a program that: [quote]Write a program to count and print out the number of copies of the letter 'e' that are found in a pre-specified string. (By "pre-specified", I mean you should declare and initialize the string right in your program, rather than reading …

Member Avatar for Aia
0
80
Member Avatar for restrooms

HI CAN U PLS HELP ME IN ADDING SOMETHING TO THIS PROGRAM TO BE LOOK GOOD. HERES THE PROGRAM I'VE MADE. #include <stdio.h> #include <conio.h> int a,b,c; int main() { clrscr(); printf("Enter Number:"); scanf("%d",&c); switch(c) { case 1: printf("\t\t\tJanuary 2007"); printf("\n\t"); for(b=1;b<=51; b++) { if(b==51) printf("=\n"); else printf("="); gotoxy(9,3); printf("Sun\tMon\tTue\tWed\tThu\tFri\tSat\n\t"); …

Member Avatar for twomers
0
223
Member Avatar for kohkohkoh

i have done a simple program, which i asked..(don't know how many days ago.) but i find that there is a problem.. if i give an input (for example) 1234 it shall reverse back 4321 (it does) when i key in 100, by right it should return 001, but it …

Member Avatar for Narue
0
177
Member Avatar for restrooms

im new about this fibonacci can someone post a sample program of fibonacci so i can see on how it was done. pls thanks in advance

Member Avatar for Salem
0
57
Member Avatar for Lost in Code...

Hello, When I run my code below, it lets me pick a number and seems to go through my first IF statement fine. However, after I get through my first IF, I'm wanting it to then add to my tries so that when I go over 5 or more tries, …

Member Avatar for ChaseVoid
0
117
Member Avatar for baberca

[code] #include<stdio.h> #include<conio.h> #define n 20 main() { int d,p; int b,i,n,bt[20],at[20],num; int arr[20]; clrscr(); printf("ENTER THE NUMBER OF PROCESSES: "); scanf("%d",&n); for(i=0;i<n;i++) { gotoxy(10,5); printf("PROCESS: %d",i+1); gotoxy(25,5); printf("BURST TIME : "); scanf("%d",&bt[d]); gotoxy(50,5); printf("ARRIVAL TIME :"); scanf("%d",&at[p]); } gotoxy(29,20); printf("SELECT ALGORITHM"); gotoxy(29,25); printf("\n[1] - SJF"); gotoxy(29,30); printf("\n[2] - SRTF"); …

Member Avatar for Salem
0
303
Member Avatar for ITapprentice

I'm back and I 've changed my code around a bit. I almost have it compiling except for one error that says there is a syntax error before inFile my struct that will hold my arrays. It's in the second for loop. I think that I have my struct declared …

Member Avatar for Aia
0
114
Member Avatar for pprabhakar

i want some information ab function pointers , just how it will work ,addvantages osf function pointers

Member Avatar for Narue
0
104
Member Avatar for pdwivedi

I have several .CPP and .H fles which i want to compile together. These files are used for PLC and Oracle database communication. How can i compile these files? I have Borland 2006 C++ IDE, also VC++ IDE. Please help. Thanks in advance. Prashnat

Member Avatar for Ancient Dragon
-1
69
Member Avatar for ITapprentice

I've seen tons of examples, but I can't seem to find what I need. I'm pretty new to programming, only been doing it for 9 months. Here's what I'm trying to do. I'm loading a file with the below info. 12 Item1 15 1 Item2 10 1 Item3 1 2 …

Member Avatar for iamthwee
0
2K
Member Avatar for koyong

[code=c] #include <stdio.h> #include <string.h> typedef struct { char item[50]; int date[15]; float price[5]; int amount[10]; float total[10]; }EXPENSES; EXPENSES aExpenses; int getOption(); void input(); void viewAll(); void del(); void edit(); int main (void) { int done = 0; int option; //while (!done) option = getOption(); if (option == 5) …

Member Avatar for hilia
0
250
Member Avatar for shruthi.j

Please send a sollution to this . I have a csv file named file.csv. I need to read that using array and then sort them based on the column. please can you help in the sorting technique.

Member Avatar for Ancient Dragon
0
106
Member Avatar for Sanchez10

Would anyone be able to help me get started on writing a program to implement a page-replacement algorithm suchs as FIFO?

Member Avatar for vas555552006
0
68
Member Avatar for alsoumhi

Hi guys, how are you? I need your help in a tic tac game, I have created a program that asks a user to specify first the index whether [0][0],[2][1],[2][2],etc..and to enter the char letter either 'x' or 'o' but I don't know where is the wrong? can any any …

Member Avatar for Ancient Dragon
0
102
Member Avatar for tehloki

I'm trying to implement a Double-Linked List ADT in an array (contiguous memory only, no dynamic allocation at runtime). So far, all my code does is generate a seg fault whenever I try and add a new element. Here's the whole ADT, if anybody feels like looking over it. FILE: …

Member Avatar for Narue
0
123
Member Avatar for dc101

Hello, I can't seem to find any example code where a 2-dimensional array is returned from the function. This is my code: [code=C] char *updateBoard(char board[3][3], int position, char piece){ //board is changed here //want to return new board return board; } [/code] any suggestions are much appreciated.

Member Avatar for alsoumhi
0
88
Member Avatar for aldebaran31

I have written a program in c. It's relatively simple, but I need to learn how to write a help file that can access the documentation within the program and output it, for example, I would like it that if the user were to type help input at the command …

Member Avatar for Salem
0
79
Member Avatar for muhammad amir

hi, in my last lecture i had faced a quiz, it was related to two dimensional array.i was unable to solve it.the question is "you are required to find a generic formula of the two dimensional array that how memory is being allocated for two dimensional array ?how compiler know …

Member Avatar for jotsaroop
1
110
Member Avatar for psyman_86

Hi, Im trying to implement a LCD screen as part of a engineering design project. The screen is to be connected to a M16C/62 microcontroller. In order to compile the software I am using the NC30WA V5.20 Release 1 compiler, as it is the compiler which comes with the development …

Member Avatar for psyman_86
0
262
Member Avatar for berty_xx

Hi, i need calculate date and time from Timestam received from NTP server. Can you help me with alghoritm? NTP stamp is numbers of second from 1.1.1900..... Best regards Peter

Member Avatar for Salem
0
54
Member Avatar for csteverun

Would anyone be so kind as point me to a resource that explains how to make calls to a DLL from a C program? My Google skills have failed. I found many web pages talking about how to CREATE a DLL, but none that explain the minimum code needed in …

Member Avatar for Salem
0
119
Member Avatar for furpacino

oke i am sorry for before i didnt know about this side so much. Now i am sending a file with attachemnt. I have to rewrite this while loop. if you help me i will presuade about your helps.

Member Avatar for Aia
0
111
Member Avatar for Bikram

helos...!!! wel am new to dis..!!! but i hav a code to it...!!! lets try out..!!!!! [code] #include<stdio.h> #include<conio.h> void main() { int i,j,count=1,flag,arr[5],p[5]; for(i=0;i<5;i++) scanf("%d",&arr[i]); p[0]=arr[0]; for(i=1;i<5;i++) { flag=0; for(j=0;j<=count;j++) { if(arr[i]==p[j]) flag=1; } if(flag==0) { p[count]=arr[i]; count++; } } for(i=0;i<count;i++) { printf("%d\t",p[i]); } getch(); } [/code] try dis …

Member Avatar for Narue
0
123
Member Avatar for maye13

I need to create a C program that goes like this: The user wil enter the number of seconds that the stopwatch should run starting at the equivalent time in hours, minutes and seconds of the input. The stopwatch runs until the time becomes 00:00:00. I don't want you guys …

Member Avatar for maye13
1
2K
Member Avatar for placo23

Hi, I'm pretty new in this forum and also new in C development. I was wondering if there's a way to play rm/rmvb files in a C application. I did a bit of research but without any success. Can somebody help me here? [B]UPDATE:[/B] Just as un update, I wanted …

Member Avatar for Salem
0
134
Member Avatar for need_ur_help

i hav made a linux based proxy sever in C in which a separate thread is invoked for each clieant but when a client request a page which is cached and a function reads its file, in mean time another client requests any page then a segmentation fault occurs. all …

Member Avatar for prabhat padhy
0
36
Member Avatar for kemboy

hey can anyone explain this code to me, i am trying to understand it for days now but i still cant figue it out its the code of "the towers of hanoi"........it goes like this... [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<stdio.h>[/COLOR] [COLOR=#800000] [/COLOR][COLOR=#0000ff]void[/COLOR][COLOR=#000000] hanoi([/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] n,[/COLOR][COLOR=#0000ff]char[/COLOR][COLOR=#000000] from,[/COLOR][COLOR=#0000ff]char[/COLOR][COLOR=#000000] aux,[/COLOR][COLOR=#0000ff]char[/COLOR][COLOR=#000000] to) {[/COLOR] [COLOR=#0000ff]if[/COLOR] (n==0){ [COLOR=#0000ff]return[/COLOR];} hanoi(n-1,from,to,aux); printf([COLOR=#800000]"\nMove …

Member Avatar for Salem
0
89
Member Avatar for megan-smith

what is a newline character and what does it do? for example, what does " variable != '\n' " mean? And is there any other way to write" if (variable != '0' && variable != '1' && variabel != '\n') "? I've tried " if (variable < '0' && variable …

Member Avatar for megan-smith
0
133
Member Avatar for theraven1982

Hello, i'm still trying to learn C, and I have a new question ;). I want to declare a struct, and use a function to manipulate the entries. If I change the values within a function it's ok; however, when i access the members outside the function, they're not defined …

Member Avatar for theraven1982
0
21K
Member Avatar for abhishekgahoi

#include <stdio.h> int main() { int i=5; printf("%d %d %d %d %d", --i,i--,++i,--i,i); return 0; }

Member Avatar for Aia
0
165

The End.