Correct me if I am wrong but these are the things you might want to consider.
1) Try passing the Pointer to the Array instead of the Array itself. Its expensive if you pass the whole array all the...
Type: Posts; User: sunny`
Correct me if I am wrong but these are the things you might want to consider.
1) Try passing the Pointer to the Array instead of the Array itself. Its expensive if you pass the whole array all the...
Thanks guys my problem is solved. But Dont let me stop your discussions.
Tried printing with 5 and 9. Got Spades Now haha. Is this my code or my Computer? or my compiler? And yeah thats the same code....
Yea I got an Output but it looks like a 2d Array containing Invalid characters( Got some Smily Face). haha.
Whats wrong....
Guys I am trying to write a code for solving the 8 queen problem But the Problem is I cannot Print out the Result. There is something really weird going on. the function showsol is not doing its job....
Sorry christop for double posting and not understanding what you really meant.
but now I do.
The Program is solved
it should be like this right? It was allocating 2 bytes for the pointer...
What do you mean Christop?
If you take a look, when ctree is called for the first time, **ptr is a Pointer to the Pointer of the structure
so (*ptr) is Start
(*ptr)->lc=Memory allocation
So...
Hi all,
I have been trying to create a Binary Tree using Pointers but there is strange problem comming up.
Somehow The right child of any Left Sub-Node is not taking the Value NULL when...
Thanks for the Comments. I Solved it. There was some problem with swaping the numbers.
Here is the final Code.
#include <Stdio.h>
#include <conio.h>
int sorted(int *l, int *u)
{
OK guys I kind of Fixed this but the problem is--
1) It works upto 6 input.
2) When I give 7 or more Numbers to sort. It gives no response.
Please tell me whats wrong with my code.
...
Greetings All,
I am trying to write a program for sorting number by quick sort method.
I am posting the Code, There is no Compiler error but the result is wrong.
can anyone please point me...
Hi all, I have a program(Not really a complete program) to write and I need some help. I will give the question bellow. Please help in whatever way you can.
1)Using Poinrer Write a C function...
Hi all, I tried writting a programm for finding the frequency of a word in a sentence, that is the number of times a word is repeated in a sentence.
'The problem is the answer is always zero and I...
Hi all,
I wrote a program for sorting a set of numbers but it not working.Please check.
#include <stdio.h>
#include <conio.h>
int main()
{
long int count1,count2,copy,a[5];
ok, This one Worked. Thanks Alot.
#include <stdio.h>
#include <conio.h>
int main()
{
int count1, count2,num1,num2,num3,num4,m,n;
clrscr();
I want to print the following pattern,
ABCDEFGH
ABC FGH
AB GH
A H
I wrote the following programmfor it but It ends up in an Infinite Loop. Someone please help me out.
ok I zeroed the sum but still its not running correctly.
peterson number is a number say xyz.
then xyz=x!+y!+z!
example is 145=1!+4!+5!
Greetings all, I wanted to print all the peterson numbers in a giving range and wrote a program.
The output is 1 and then it hangs.( for input 1 and 500)
#include <stdio.h>
#include...
what is the problem with conio.h?
Thanks to your signature I solved my problem.
I simply printed num, copy. I found it out that Num was gettting scaned alright but num is not being stored in copy.
so What I did was, Reversed...
Greetings everyone, I wrote a program to check if a number is peterson or not and does not seems to be working. Can anyone please check it out.
#include <stdio.h>
#include <conio.h>
#include...
ok Thanks, I got it working and I used this format.
#include <stdio.h>
#include <conio.h>
#include <math.h>
int main()
{
int x=0,r,n=0,a;
clrscr();
Thank you jim, that was a very foolish mistake by me.
But I am having a new problme now. I will give you an example of the execution of the program.
Input: 123
output :123
Its not...
Hi, I am new to this forum, so I am very sorry if I make any mistakes.
I just wrote a programm today and it seems something is wrong with it. It compiles alright and runs too but it hangs after...