15,540 Topics

Member Avatar for
Member Avatar for Himanshu Chawla

Please Help me to get the solution of this pattersn as i am weak in loops that is why i am asking and i have my exam tommorrow .

Member Avatar for felceyboy
-2
198
Member Avatar for prathiyus

Hello all, im quite new to network programming,im writing c code which dealt with transferring files using TCP over Sockets, In my code,client sends the header information(information about the file ) to the server ,the code works fine but received file size is sporadically a small than the file that …

Member Avatar for rubberman
0
199
Member Avatar for general2012

i've written these codes to evaluate a total heat transfer.but there are some problem arrived #include<stdio.h> #include<conio.h> #include<stdlib.h> int main() { int *temp,*thick,*area,*cond,total_temp,n,i; double q,total_other; temp=(int *)malloc(20 * sizeof(int)); thick=(int *)malloc(20 * sizeof(int)); area=(int *)malloc(20 * sizeof(int)); cond=(int *)malloc(20 * sizeof(int)); printf("how many slabs?"); scanf("%d",&n); for(i=0;i<=n;i++){ scanf("%d",&temp[i]); } for(i=0;i<n;i++){ scanf(" …

Member Avatar for general2012
0
236
Member Avatar for nitin1

int a[]={1,3,4,5,7}; int b[]={2,3,5,6}; int m=sizeof(a)/sizeof(int); int n=sizeof(b)/sizeof(int); cout<<m<<" "<<n<<endl; this code prints 5,4. but when i pass the arrays to some function and then i print the m,n values then it is printing 1,1. i know that they are acting as pointer when i pass then in function and …

Member Avatar for Banfa
0
117
Member Avatar for harinath_2007

Hi folks.. Here comes the same old question ..."How to get the source code for an exe file??" Firstly , i am bored of asking this question as i dont think it is possible.. But what made me to re-ask this question is the excitement of some file that i …

Member Avatar for deceptikon
0
137
Member Avatar for wnr78ta

Hi, I am working on a program that uses an array of integers(1 and 0) to represent a gray code. For this to work I first have to take an integer and convert it to the binary, then convert the binary to gray code. The for loops i use to …

Member Avatar for Banfa
0
757
Member Avatar for general2012

is it possible to allocate memory for multiple pointer using single malloc like this #include<stdio.h> #include<conio.h> #include<stdlib.h> int main() { int *p,*q,*r,*n; p,q,r,n=(int *)malloc(20 * sizeof(int));

Member Avatar for general2012
0
123
Member Avatar for nitin1

can anyone give me some good references or links or some guidelines to start with this ? i need to learn this. like i want to know how can i implement malloc, calloc, realloc etc. for this thing also, what do i need to learn firstly ? thanks. any kind …

Member Avatar for Ancient Dragon
0
144
Member Avatar for Himanshu Chawla

I want to Print Characters ABCD.. in Pattern but this code is not printing output on screen , Please Guide me and Tell me where is my mistake ? #include<stdio.h> #include<conio.h> main() { int i,j; int count=65; for(i=0;i<=10;i++) { for(j=65;j<=i;j++;count++) { printf("%c",count); } printf("\n"); } }

Member Avatar for Schol-R-LEA
-1
190
Member Avatar for mzeewashooo

this is my code, when even i run it it tells me that the number is even while it is odd. #include<stdio.h> #include<stdlib.h> int main(void) { int value; /* To read a number and say wheither it is even or odd*/ printf("Please enter any number \n"); scanf("%u", &value); if (value/2 …

Member Avatar for Ancient Dragon
0
221
Member Avatar for dendenny01

How can I write a program to find the sum of the series given below:- ((1)/(2))+((3)/(4))+((5)/(6))+((7)/(8))+((9)/(10))......n I have written a code but it is not giving the desired result... #include<stdio.h> #include<conio.h> void main() { int n; float sum=0,i; printf("Enter nthe term"); scanf("%d",&n); for(i=0;i<n;i++) { sum=sum+((i+1)/(i+2)); } printf("sum=%f",sum); getch(); } Please …

Member Avatar for Schol-R-LEA
0
219
Member Avatar for general2012

hi, after a long time been posting in this forum.I am trying to manipulate newtons divide difference formula ,actually like this [see here](http://www.dailyfreecode.com/code/newtons-divided-difference-method-2381.aspx) but in a different manner .but my code is not working.i am getting disgusting values in my table.can any one please check the errors and tell me …

Member Avatar for general2012
-1
198
Member Avatar for RediRedi

Any of you knows a way to solve Power cricis [Click Here](http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=87) So fare i've found this code but i doesnt help much as it takes N as input(13<N<100) and return an M so that the last one standing is the 13th city. int main() { int N, M; struct …

0
76
Member Avatar for general2012

hi, after a long time been posting in this forum.I am trying to manipulate newtons divide difference formula ,actually like this [see it here](http://www.dailyfreecode.com/code/newtons-divided-difference-method-2381.aspx) **but in a different manner** .but my code is not working.i am getting disgusting values in my table.can any one please check the errors and tell …

0
90
Member Avatar for shark101

hey guys I need help with this I have no idea how to work this out please help me with like atleast the starting coding i am trying to google too but i cannot find any info on this. ***"char * copyString( const char * s ); copyString returns a …

Member Avatar for raptr_dflo
0
276
Member Avatar for Landoro

Hey guys! It's been a long time since I visited daniweb,but I need some help understanding something.A friend of mine gave me problem to solve, but the assignment is strange,I can't seem to find the actually meaning of what I need to generate as an answer.Here goes: By a given …

Member Avatar for raptr_dflo
0
276
Member Avatar for alice.ng.3344

I am doing code for CAESAR CIPHER. I need to built a histogram or frequency distribution for the output. I thought that finding out the frequency of the ASCII code, then print the frequency with * by using loop. But my code din't have array, can't do ++freq[c[i]]. I have …

Member Avatar for DeanMSands3
0
340
Member Avatar for Cwww

Hello, i have create a human tree, the only remains is to get the codes in Huffman tree (0-Left, 1-Right) How i can traverse the tree and for every letter-weight in tree to get the path of 0101 How my code works ***1st Part - Nodes Initialisation*** - Create Tree …

Member Avatar for Cwww
0
276
Member Avatar for str91

hello friends i wanna know is this algorithm for Travelling salesman problem (TSP) correct ? if isn't help me for correct algorithm plz ? tnx int tsp(int **adjMatrix, int numberPoints) { for (int i = 0; i < numberPoints; i++) for (int j = 0; j < numberPoints; j++) for …

Member Avatar for rubberman
0
122
Member Avatar for silentdragoon

Can someone point me towards a dead basic, complete example of a hash table utilising chaining? I've got a working hash function, I am just getting really frustrated with not understanding what I don't understand with the setting up of the hash table. All the examples on the web I've …

Member Avatar for arshdeepkaur
0
652
Member Avatar for cdea06

So I just started a "C" class and I've done my first few assignments but I feel like I'm over complicating the codes by using to many if else statements. Here's the assignment and my code. Please let me know what you think: [B]Write a program that asks the user …

Member Avatar for rubberman
0
296
Member Avatar for sourabhyogi

Hi, I am trying to write a program which read a certain input in a particular format and then gives an ouput. I wrote a code to read the file. Input is something like this. X 20 60 80 90 X 78 98 97 96 X 34 35 43 23 …

Member Avatar for sourabhyogi
0
259
Member Avatar for nitish.mohiputlall

FUNCTIONS the question is as follows: write a function, ComputeAmount, that takes as input the quantity of an item and the item unit price, and returns the net amount to be paid by customer. my program is working correctly please advise me what i did wrong here are the codes: …

Member Avatar for rubberman
-1
147
Member Avatar for ferizhandi

i want to write a sever application.my sever have some service to client. some of the answer of my server is long(transfer file) and some of them is short(list of online client). when server transferring file to a client , other client request to get online client list. i want …

Member Avatar for rubberman
0
202
Member Avatar for broccoli

Hello everyone. I have to connect to a running server on another host [COMPLETED]. Then, I have to perform a webchat with any chosen single client in the server and I have some questions about that. I am able to connect to any chosen client in the server, I am …

Member Avatar for iamthwee
0
185
Member Avatar for nitish.mohiputlall

write a program that prompts the user to input a positive integer , if the user enters zero or a negative value for nu, it prompts user to input num again and repets this process untill unser inputs a correct value. it then display the sum of the numbers 1 …

Member Avatar for ddanbe
-1
229
Member Avatar for blackcathacker

Yeah, basically I'm asking if anyone could either walk me through a solution of a problem, or if it would be easier to simply do it themselves. I'm "taking" a C class, and would love it if I could get pointed in the right direction with a certain problem. All …

Member Avatar for ddanbe
0
408
Member Avatar for nitish.mohiputlall

(i)Write a function in C Programming Language, isEven(), that takes an integer value as argument and returns 1 if the latter is even, otherwise returns 0 (zero). (ii)The function isEven() is saved to the file 'usefulfunctions.h'. You are required to write a C program that allows the user to enter …

Member Avatar for Ancient Dragon
-1
194
Member Avatar for Tsaou

Hello everyone... I've searched a lot for this but i can't really figure this out. My project consists of 5 .c files and 4 .h headers. all in the same folder. I compile them separately succesfully but when it comes to group compiling (gcc -o progname and all the code …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for Raghuvamshi

Quick sort is a faster way to sort a given array by recursion The algorithm goes like this: it first takes some index element and seperates all elements lesser than this with larger numbers then places this element in right place and does the same thing with all other

Member Avatar for hhhadvani00
0
856

The End.