15,551 Topics
| |
Hello guys, I started this project but cant seem to finish it. You guys are my last hope, any help would be GREATLY APPRECIATED.These are the requirements, it seems I am mixed up. The owners of Body Language Fitness Centre require an information system that can manage and maintain their … | |
This is begining. BALANCE PARANTHESIS and show the result of ((9-4)/(44*34)) etc ??? what to do? int main() { char arr[30]; for(int i=0;i<30;i++){ if(c=='(') c++; else if(d==')') d++;} if(c==d) printf("parenthesis are balance"); else printf("are not balance"); } further cant understand. | |
Hello Daniweb. [B]Scenario[/B] For a project we have to write a irc server. For this, we first wanted to investigate what kind of server architecture we should apply. (e.g. multithreading, multiplexing, multiprocessing etc.) We've written simple servers which implement different architectures. The servers basicially receive a message, and then send … | |
Hello, I am trying to get the following code to print out the number of days in each month using pointers. This what the program currently prints: Enter a year (ex. 1997): 2001 Year entered: 2001 --Not a Leap Year!-- Number of days in each month: January: 0 February: 0 … | |
how can i add the last value to the current value using loop..? i tried so much but didn't find the answer :( [CODE]void main(void) { int numbers,add,sec; clrscr (); for (numbers=1;numbers<=49;numbers++) { for (sec=numbers;sec<=numbers;sec=numbers+sec) printf ("%d ",sec); } getch(); }[/CODE] here the loop is from 1 to 50, i … | |
hi everyone... i"ve to pass a string as a returning value.but wat is the problem is there is an integer in the middle of it.the problem arise here.. [code]char* my_string( char* dest,char *c) { char str1[25] = "C:\\windows\\"; char str2[25]; char str3[25] = ".jpg "; strcat(dest,str1); //append str2 to str … | |
Hi All, How to copy one 2D-array to another without using loops and library function of C. Not pointers. Regards, Pramod | |
hi guys i have an urgent problem....we have been asked to make a battleship game in C which will have the formation of ships taken by a file txt.....for example 00000000 ppp00000 0000nnnn 00000000 etc...i want to open the file txt and then put every single character 0,p,n etc to … | |
Hello Guys, I have implemented a linked list. And my output looks something like dis: ************************************************* The elements in the list : address is = 163196952 ADOC1100250100000119666 address is = 163196968 ADOC1100250100000119666 address is = 163196984 ADOC1100250100000119666 address is = 0 ADOC1100250100000119666 TOTAL NO OF ELEMENTS IN THE LIST ARE … | |
Hi, I am stuck in file reading problem. I have tried various solutions but nothing worked. Actually I can't develop a logic to do so. I want to read some lines from file and pass them to structure. When reading a file you must use WHILE loop. I am posting … | |
Does anyone understand why Data2 would not equal Data? I print, and can see, that they LOOK the same, i.e. have the same number of rows and columns with the same values in each element. But when I pass the matrices to a calc function, they give different results. I … | |
New to C and haven't had any problems until now - I can seem to get straight with passing arrays between functions. Here is what I need to do: Write a program that declares 3 single-dimension arrays named bookPrice, numBooks and totAmt. Each array should be declared in main() and … | |
Well i'm just starting to study recursion and i have a small problem. I'm trying to write a program which generate every six digit combination where every digit is used only one time. I've writed an iterative (i think this is the correct term) : [CODE]#include "stdafx.h" using namespace std; … | |
[I][B][B][/B][/B][/I] i want to put the answer like user enter any odd number then out put will be like this one if 3 *** * * *** the even rows shows only 1st and last stars LIKE 5 ***** * * ***** * * ***** [CODE] int main(){ int num,i,j,k,l; … | |
what is the correct declaration of pointer to a pointer to array of N elements. ( i want to store address of pointer to an array of n elements ) i am using the below declarions seperately , but getting errors. [CODE] int (*p)[4]; int (*p1) (*)[4] = &p; int … | |
Hi! I'm trying to use the nanosleep and sleep functions in a program I am trying to write. I first tried this - [CODE] fprintf(stdout,"Hey guys.."); struct timespec t_req, t_rem; t_req.tv_sec = 1; t_req.tv_nsec = 500; if (nanosleep(&t_req, &t_rem) < 0) return 0; fprintf(stdout,"...What's up?");[/CODE] Since the function nanosleep did … | |
Hi, When I assign the value of one structure variable to the other I got the error "incompatible types in assignment". The Code is the following. The Problem line is 91. [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> struct file_data{ char src_ip[18]; char dst_ip[18]; char src_port[8]; char dst_port[8]; char p2p_proto[18]; struct … | |
I am having troubles getting my program to work. It is supposed to take integers from a file and put them into an array. Then it is supposed to sort them by the bubble sort algorithm. [CODE]#include <stdio.h> #include <ctype.h> #include <stdlib.h> #define N 10000 int main(int argc, char *argv[]) … | |
Hello everyone! I am new to this forum (and C programming) but I hope that I will be able to master C help anyone out with problems in the coming months. But I am having trouble with my own program for an assignment. I am asked to simulate a user … | |
HI i made this program for odd inputs if press 5 then ***** * * ***** * * ***** but not showing the correct answer. write a right code if u can plz thanks alott. [CODE] #include <stdio.h> int main() { int num, i; printf("press any odd num"); scanf("%d", &num); … | |
I need your help AT ONCE plz IN C CODE ONLY i have a program to make an array of length 30 and NOW write equation like this ((3+4)-(24/5)) .... the paranthesis must be balance and the output of the operation must be shown IF paranthesis are balanced. HELP ME … | |
Hey guys and girl i need your help in program only in C CODE user press only odd numbers then the following result has been shown like if 3 then *** * * *** if 5 then ***** * * ***** * * ***** PLZ HELP ME >>>> Thanks | |
I am so lost in this programming assignment. Here is what I am suppose to do: A. Define a struct that represents a CAT as follows: A CAT has a weight, name, and a neutered flag, i.e., those are the components of the struct. Use a typedef. B. Declare a … | |
Hey I rather not use conio.h for cross compatibility so is there any way to make my own "conio.h" and just include it in my compilation. Thanks. | |
hi all, i created a window using c, next i want to add a text box in the window. Since am working on 32-bit, i donno which functions to use in that.... pls suggest me the procedure to implement this...... | |
heya, watz de meanin of malloc.h n alloc.h in c-programmin(both are different)? what is the difference between 1 pointer n 2 pointer in link list of stack? wat is the meanin of arrow mark pointer? | |
the code is: [CODE] slen=strlen(str); for(count=0;count<=slen;count++) { flag=0; if((int)str[count]!=32) { for(count2=count+1;count2<=slen;count2++) { if(str[count]==str[count2]) { flag=1; break; } } if(flag==0) { ar[ar_count]=str[count]; ar_count++; } } }[/CODE] at line 5 the != operator working fine but when i put [ICODE]if(((int)str[count]>=65 && (int)str[count]<=90) || ((int)str[count]>=97 && (int)str[count]<=122))[/ICODE] it's not working.. if you've some … | |
hi all im stuck to my assignment 1. i want to know how to use function search in order i can search each character in a string then count the number of it. for example: given : home alone the output will be : the string has 9 characters including … | |
Hi, I am working on structures. One of the structure member is char array i.e string. When I assign another string to this then it throws the incompatible error. The code is the follwing. The problem line is commented. Code: [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> struct file_data{ char src_ip[18]; … | |
The End.