76 Posted Topics

Member Avatar for xavier666

Suppose the user wants to input a string. The length of the string is unknown. I also don't want a character array of size 1000 or what so ever. I want the size of the character array increasing by 1 byte for every character entered. Here is a sample output …

Member Avatar for Narue
0
426
Member Avatar for imso

Also don't use [icode]conio.h[/icode]. It is not a part of the standard C library. I guess you're compiler is quite outdated. I recommend [URL="http://sourceforge.net/projects/codeblocks/"]Code::Blocks[/URL]

Member Avatar for Dave Sinkula
0
214
Member Avatar for samsons17

Are you trying something like this? [code] * * * * * * * ********* [/code] If possible, try to generalize the program for a triangle of order n (where n could be the height). One method of solving this could be for you to first develop a program for …

Member Avatar for xavier666
0
173
Member Avatar for xavier666

I was making a DEQUE program utilizing two separate lists for forward and backward traversal. But what I think I've done is ended up making [U]two separate lists[/U], having same data but only their [U]order reversed[/U], thus wasting memory :'(. So what I want to know is this how a …

Member Avatar for Narue
0
173
Member Avatar for daudiam

[QUOTE=Ancient Dragon]An example you can see here occasionally [icode]a = c++ + ++c;[/icode] The result of that expression is undefined because (most likely) it violates the rules you cited. Consequently the result store in a will be whatever the compiler writer decided it to be.[/QUOTE] [I]It recently came to my …

Member Avatar for Narue
0
99
Member Avatar for xavier666

I just made a 'Hello World' program [code] #include<stdio.h> int main() { printf("Hello World\n"); return 0; } [/code] [code] exe file size = 15.5 KB Source file size = 79.0 B [/code] Then i made a data structure program (implementing stack, queue, deque) [code] exe file size = 21.9 KB …

Member Avatar for xavier666
1
176
Member Avatar for redroze

Strictly speaking, this problem is not recursive in nature. What you can do is to let the function call itself (while traversing through the array) and with the help of some conditional operators check when the predefined sum is equal to the running sum inside the function. But this is …

Member Avatar for uskok
0
153
Member Avatar for raghuhr84

Points to be noted, raghuhr84 [list] [*]Give the complete program, that is, give [icode]#include<stdio.h>[/icode]. Becomes easier for us to check. [*]Use proper indentation [*]Use code tags around your program (See the forum rules) [/list] The problem is that you have not flushed stdin. Put [icode]fflush(stdin);[/icode] before the [icode]scanf[/icode]. That should …

Member Avatar for Dave Sinkula
1
690
Member Avatar for bgspace

All this looks very exciting but you have got to understand that some of us don't understand Bulgarian (Had to Google it and I'm still not sure). Please convert the program outputs & comments in English. You should have read the [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]forum rules[/URL] which clearly states to write "in full-sentence …

Member Avatar for jephthah
1
326
Member Avatar for harshchandra

I was expecting someone to explain him the problems about his code. Ah well ... Hi harshchandra, Thank you for presenting your code snippet but your code has some major faults, hence lost it's appeal. Your program displays the bad practices of C. They are as follows [list] [*][icode]conio.h[/icode] - …

Member Avatar for Nick Evan
-2
614
Member Avatar for Micia

[QUOTE=Micia]but she didn't taught us how to[/QUOTE] She didn't teach you because it's for you to figure out (of course I'm assuming your teacher has taught you the basics) [QUOTE=Aia]You missed to read the rules of the forum. We don't give any code away without you posting what you have …

Member Avatar for xavier666
0
193
Member Avatar for xavier666

During run-time of a menu driven program, I want the user to see what option the user has entered. Something like this :- [CODE][OUTPUT] . . . Enter Option : [1] <- [I]User given[/I] Press Any Key To Continue ... [_] <- [I]Blinking Cursor[/I] . . . [/OUTPUT][/CODE] After I …

Member Avatar for xavier666
0
155
Member Avatar for endofworld201

Don't listen to them endofworld201, I'll help you cheat. Here is my code, follow this and you'll be way ahead of your class before you know it [CODE] #include<stdio.h> int main() { printf("\nRead the forum rules"); printf("\nRead your C text book"); return 0; }[/CODE]

Member Avatar for xavier666
-1
105
Member Avatar for xavier666

[INDENT]Hello everybody, I just started learning C and decided to join this site. But as soon as I posted some of my code snippets here, immediately I got a stream of insults (thanks to [icode]conio.h[/icode]). But it's not my fault, I've grown on [icode]clrscr()[/icode] and [icode]getch()[/icode] (due to my experience …

Member Avatar for xavier666
0
131
Member Avatar for es cape85

It can be done using strings though. But I've not thought about it yet. The nature of this problem is similar to adding two 50 digit decimal numbers which has to done by strings

Member Avatar for jephthah
0
98
Member Avatar for keyzzz_it

keyzzz_it, please provide the complete program, along with the header files. It seem that you have provided a very sketchy program. Give the complete program within code tags. It's beneficial both ways

Member Avatar for xavier666
0
178
Member Avatar for bubonic88

The errors were :- [list] [*]Writing [icode]%C[/icode] instead of [icode]%c[/icode] [*]Placing the brackets incorrectly [/list] The corrected code is as follows:- [CODE]#include <stdio.h> #include <stdlib.h> //GIGO.c- Coded by Ross Camarillo aka Bubonic_88 // on 12/02/2009 //Created by Randy Gibson #define SYMB '*' // character to show in the letters void …

Member Avatar for xavier666
0
103
Member Avatar for poornimashobana

Here is the make-shift algorithm [list] [*]Take the number to be worked upon from user. Call it NUM [*]Try to find a number from 1 to half of the NUM which divides NUM and leaves no remainder [*]If you find such a number, check whether the number is prime or …

Member Avatar for xavier666
0
82
Member Avatar for meghs007

First of all meghs, your pattern is not properly indented, it should be [CODE] * * * * * * * * * * * * * * * *[/CODE] Second, you should have shown us how much you have tried. Let your code be full of errors, we'll point …

Member Avatar for xavier666
-4
107
Member Avatar for adventk

If your aim is to do the thing in one line, you can use ?: [CODE]salesTrend = (soldYesterday > soldToday) ? -1 : 0[/CODE]

Member Avatar for xavier666
0
74
Member Avatar for fedya

Is there a seperate function provided by C to sort and swap? [QUOTE]Sort values in an array without using sort functions (Urgent) [/QUOTE] What does this mean anyway? Are you asking to make a custom sorting function?

Member Avatar for xavier666
0
6K
Member Avatar for samipa
Member Avatar for duke.tim

You can also do this [code] #include <iostream> #include <conio.h> using namespace std; int main() { int hiya; cout<<"hello world \n"; getch(); cout<<"enter a number \n"; cin>>hiya; cout<<"you entered \n"<< hiya; getch(); }[/code]

Member Avatar for Nick Evan
0
261
Member Avatar for xavier666

[B]This is just a linked list program for those who need help understanding the fundamentals. Put comments if you find some bugs. The program is about maintaining a student database (their roll number and their age) I've used Turbo C++ 4.5 as the compiler[/B] :icon_cool:

Member Avatar for xavier666
3
210
Member Avatar for fiz

[code=c++] #include <stdio.h> int i; int j; int row; int column; int sum[10][10]; int sub[10][10]; void dimension(void) { printf("\n\n\tEnter The Dimensions Of The Matrix : "); printf("\n\n\t\tROW : "); scanf("%d", &row); printf("\n\n\t\tCOLUMN : "); scanf("%d", &column); } void display(int *m[][10],int r,int c) { for(i = 0;i < r;i++) { printf("\n\n\t"); …

Member Avatar for xavier666
0
105
Member Avatar for janxxx

Seriously, how much effort does it take to write code and /code within brackets. And Fran, i wrote a calendar program in the forum. Take a peek at it. Make sure to delete all clrscr() and #include<conio.h>

Member Avatar for Salem
-3
207

The End.