15,548 Topics

Member Avatar for
Member Avatar for theausum

[code=c] #include<stdio.h> #include<conio.h> #include<string.h> void permute(char *str,int l,int pos,int r); void swap(char &a,char &b); void print_string(char *str,int r); int main() { char str[10]=""; int l,r; printf("Enter The String : "); gets(str); l=strlen(str); printf("Enter The Number Of Places To permute on : "); scanf("%d",&r); printf("The Following Permuations are possible : \n\n"); …

-1
41
Member Avatar for unleashedvigil

I am needing to have this program choose between two options randomly. The program all works except that when I use this line of code: int x= rand() % 2; it seems that it's not random but rather follows the same pattern every time. I have searched and found things …

Member Avatar for unleashedvigil
0
81
Member Avatar for sudokusolver

i designed this tic tac code in c bt there is sum prblm wid the part where program has to decide the winner it dosent seem 2 workin im posting the code any help is greatly supported #include<stdio.h> #include<conio.h> void main () { int go=0; int i =0; int player; …

Member Avatar for WaltP
0
115
Member Avatar for randika2000e

hay dear i need help for c prog... i used <textcolor (14+128) ,cprint> commands to blink some text. befor i drow rectanngel and some circle as back image. but the text is not apper. if i closed the graphic mood, then it'll show. but i need kept the graphic back …

Member Avatar for WaltP
-1
151
Member Avatar for akbar002426

You are to implement a very simple distributed text editor. For this purpose, each user must be provided with a simple workspace where she can either read or write plain text. You must implement the system in such a way that, at any given point of time, only one user …

Member Avatar for thanatosys
0
108
Member Avatar for thanatosys

I have a homework assignment for a c class I am in currently, the assignment is to write a simple spell checker. I am having a bit of trouble understanding how to write a trie in c. A trie would be composed of nodes, which contain the following I believe: …

Member Avatar for thanatosys
0
258
Member Avatar for dhandb01

hi there guys!!!! Could u plz help me with this program. I hav done quite a lot but there still are some problems. here is a brief overview of ma project The aim of this project is to design and develop a useful utility program, named duplicates, to locate and …

Member Avatar for dhandb01
0
149
Member Avatar for jianna

Hello all I have been learning C for about 3 - 4 weeks now and I'm in need of some help. I am trying to write a function that will give you the sum of selected integers in an array with a value of 20. I can make it give …

Member Avatar for jianna
0
458
Member Avatar for narayananec1987

I want aprogram to enroll my school time table... i have five days of school with six hour each day .,..please help me out to solve with swtich statement.,,,.

Member Avatar for ddanbe
0
40
Member Avatar for blackslither

I will give a simple example inspired from my problem : void change(int *x, int *y){x=y;} int main(){ int *xx,*yy; yy = (int*)malloc(sizeof(int)); change(xx,yy); if(xx == NULL)printf("is null\n"); else printf("---- %d ----\n",*xx); .................................................. ......... xx doesn't point to the value of yy (*yy) , the program prints "is null" . …

Member Avatar for Aia
0
144
Member Avatar for unleashedvigil

Hi Everyone, This is my first post and I hope I followed all the guidelines correctly. This is an assignment for a class. I am supposed to read integers from a file, enqueue or dequeue them and then write them out to another file. The main method calls this Work …

Member Avatar for unleashedvigil
0
86
Member Avatar for Barefootsanders

Hey all, I'm trying to use a 3 element array and keep it sorted. So when i get a new value that should be put at the start of the array, I shift values down in the array like this: [CODE]array[2] = array[1]; array[3] = array[2]; array[1] = result;[/CODE] However, …

Member Avatar for ddanbe
0
110
Member Avatar for Srynx

Hi I'm trying to generate a random number betwen any numbers (eg from 1 to 100) and I've tried this code: [CODE=c]#include<stdio.h> #include<math.h> #include<time.h> #include <stdlib.h> int NumAleatori(int max) { int num; num=((int)ceil(((double)rand()/RAND_MAX)*(max+1)))%(max+1); return num; } void main () { int N,a; srand( (unsigned)time( NULL ) ); printf(“Enter an integer:\”); …

Member Avatar for nucleon
0
116
Member Avatar for bemo55

I am having a problem with this project I am working on. The assignment is to create an application that will give a user the choice of displaying the roman numeral equivalence of a number between 1 and 10 or displaying a count of roman numerals from 1 to 10. …

Member Avatar for ddanbe
0
96
Member Avatar for rohan.raizada1

void function(int a, int b, int c){ char buffer1[5]; char buffer2[10]; int *r; r = buffer1 + 12; (*r) += 8; } int main(){ int x = 0; function(1,2,3); x = 1; printf("x = %d\n", x); } Hi, I am new to this community and have joined recently. I am …

Member Avatar for C-er
0
125
Member Avatar for voldemarz

I`m working on c program which is working in graphical mode. I use Turbo C 3.0 IDE. Until recently everything was ok, but then i gave my laptop away to the service. So I temporary borrowed one and problems apeared. Before starting the work I had to install Windows XP …

0
48
Member Avatar for En-Motion

Im trying to write a program to count characters and words when type a sentence but i keep getting "syntax error : missing ';' before 'type'" as an error. Anyone see where I'm going wrong? Thanks [CODE]#include <stdio.h> #include <ctype.h> int found_word(void); int main() { int c, nw=0, nc=0; printf("Enter …

Member Avatar for WaltP
0
329
Member Avatar for J-son

Hi there again :) Could someone tell me what is the difference between function declare in main() and outside main() ? Because I don't see anything wrong. Thanks so much in advance. Here is example, [CODE=c] #include <stdio.h> //void fun(int x,int y, int z); int main() { void fun(int x,int …

Member Avatar for Denniz
0
10K
Member Avatar for panpanf
Member Avatar for gmdune

Hi All, Thanks for all your help and suggestions...I am re-posting my code, with proper formatting for your review. The code runs correctly, but the ending balance, after all the withdrawals, is incorrect and I can't find where I messed up. Any help would be most appreciated: [code] #include <stdio.h> …

Member Avatar for Salem
0
207
Member Avatar for ambarisha.kn

I wrote the following function and it is working fine, but my problem is i want to write forward pointer address in present pointer field. I will explain in code. please check line numbers 10, 11, 12, 13 in the following code.. [code=c] void create_fbeCodeDat() { int checkSum=0; fwrite(&signature,1, 4, …

Member Avatar for ambarisha.kn
0
200
Member Avatar for hikaru1239

Hi, I was practicing for our hands on exams tomorrow when I encountered a problem in my code. Here is a part of my code: [CODE]void interactive(){ //if argument is 0, program will enter the interactive mode. int choice; int year, month, day; char div[40]; char tags[WORD_COUNT]; char entry[WORD_COUNT]; printf("\t\t....................................................\n"); …

Member Avatar for Aia
0
81
Member Avatar for phuanon

Hey i have a home work TSR program anyone can help me >> Write a progam TSR use C to turn off sound of all aplication on computer. >> If have Sound turn off it nice if u can write code THk

Member Avatar for jbennet
0
86
Member Avatar for Jahira

Dear one, I'm in need of to print "Hello World without using semicolon in C"...Itz so urgent...expecting the answers by 2day soon,.. Thq

Member Avatar for Salem
0
273
Member Avatar for Jahira

Hi.. May i have codings 2 display numbers 1 to 100 without using any loop.. Otherwise without using for loop alone... Thq

Member Avatar for Denniz
0
214
Member Avatar for sbm

I wrote this program for simple tax and gross pay calculation... Im not able to execute the progam...Its compiling but the screen frozes while executing.. I know there is some simple mistake in my program... could any1 pls point out the mistake.. [CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> float tax_cal(float gross_pay); float …

Member Avatar for sbm
0
123
Member Avatar for thuyh83

I been working on this problem for so long, when I compile, it give me an error message that I misplace else at "else if (a==0 && b==0 && c!=0)" when I remove the else at that line, it mess up my code, it won't display like it suppose to …

Member Avatar for ArkM
0
161
Member Avatar for kxh29

Hello Team: I have users who use Reflection-X (we are on AIX 4.3)when execution our application software. If they do not "back out" of the application (... Select X on the various menu screens...) gracefully, and just "click" on the "RED X", in the upper right hand corner of the …

Member Avatar for krisoccer
0
132
Member Avatar for jodyf1717
Member Avatar for ahamed101
0
79
Member Avatar for hajjo

I have this code [CODE]#include <stdio.h> int addthree(int x); int main() { int num; int d = 0; printf("enter ur num"); scanf("%d", &num); d = addthree(num); return 0; } int addthree(int x) { int s = 0; s = x +3; return s; } [/CODE] Okey I want this code …

Member Avatar for Narue
0
106

The End.