19,876 Topics

Member Avatar for
Member Avatar for t888eddy

In a forest n animals has homes. Each home has m racks, each rack for each of the m products which the animals can buy from the shop. From the shop, only the king can buy and only in the first day of the month. The king needs to know …

Member Avatar for t888eddy
0
226
Member Avatar for benk1

Hi everyone I have a simple piece of code thus: char userChoice = '\0'; validate:; printf("Please make a choice [y/n] \n"); //fflush (stdout) ; scanf("%c", &userChoice); if(userChoice != 'y' && userChoice != 'n' ) { printf("\nInvalid input; please enter y or n. \n "); userChoice = '\0'; goto validate; } …

Member Avatar for WaltP
0
150
Member Avatar for rithish

#include<stdio.h> int arr[20]; int main() { int n,i; printf("Enter the size of array\n"); scanf("%d",&n); printf("Enter the elements:"); for(i=0; i<n; i++) scanf("%d",&arr[i]); merge_sort(arr,0,n-1); printf("Sorted array:"); for(i=0; i<n; i++) printf(" \n %d",arr[i]); return 0; } int merge_sort(int arr[],int low,int high) { int mid; if(low<high) { mid=(low+high)/2; merge_sort(arr,low,mid); merge_sort(arr,mid+1,high); // Combine merge(arr,low,mid,high); } …

Member Avatar for WaltP
0
108
Member Avatar for I_m_rude

Can anyone give me the nest links so as to learn socket programming in C from net ? As i have searched net a lot and also have read many things, but i want you all to tell some more better links. thanks in advance.

Member Avatar for deceptikon
0
175
Member Avatar for jhonhiel.abasolosasaban

i cant run my program even my directories are correct.......!! my flashdrive is in (F;) then in my directories are: Include Directories F:\TC\INCLUDE\ Library Directories F:\TC\LIB what will i do.....??

Member Avatar for np complete
0
106
Member Avatar for vinnitro

This is my program: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace CountryCurrency { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void rdbRupees_Click(object sender, EventArgs e) { if (rdbIndia.Checked == true) MessageBox.Show("You are right"); else …

Member Avatar for vinnitro
0
212
Member Avatar for aasi007onfire

[code]void strcpy(char *s, char *t) { while ( (*s++ = *t++) != `\0);}[/code] i saw this code in a particular book..... in the what does the assignment statement (*s++=*t++) return each time it gets executed........ all along i was thinking that the assignment statement return a 0 or 1 based …

Member Avatar for Ancient Dragon
0
193
Member Avatar for shashikumar s g

to input an unsigned integer and reverse the first and last nibble of the number

Member Avatar for I_m_rude
0
285
Member Avatar for aero31aero

I want to make a program that analysises which key has been pressed the most as a part of my school assignment. I want that the key input be recieved by my program and later by the program it was intended for. Is there a way to do this? Please …

Member Avatar for WaltP
0
236
Member Avatar for I_m_rude

Can anybody give me code snippet for finding the nth fibo number in logn time using matrix exponentiation ? thanks in advance.

Member Avatar for I_m_rude
0
140
Member Avatar for shanki himanshu

struct abcd { char q; int w; //long int e; }; why size of this structure is 8 bytes and if i include **long int e** , size becomes 12 bytes?

Member Avatar for I_m_rude
0
108
Member Avatar for sudhanshu.srivastava.7

just like java has sun microsystem certification exam what is for c certification?

Member Avatar for I_m_rude
0
132
Member Avatar for daino

Would anyone know of a C++ report generator which can be compiled as part of a C++ Applicaiton? Is this how report generators generally work or are they largely standalone applicaitons? Thanks danny2000

Member Avatar for daino
0
158
Member Avatar for fahad.alsharafi.1

I am in first sem in university.. and i can't do it alone ~~ http://www.mediafire.com/view/?1nqlfsuc3nrg4cc any one can help to solve those 3 questions or any one ^^

Member Avatar for deceptikon
0
133
Member Avatar for princess128

Write a C++ program that calculates and displays the yearly amount available if RM1000 is invested in a bank account for 10 years. Your program should display the amounts available for interest rates from 6 to 12%, inclusive, in 1% increments. Use a nested loop, with outer loop having a …

Member Avatar for np complete
0
175
Member Avatar for AngelOfRock

Hi, To program does anyone has a good guid to learn C + +, especially to be able to programm games later (AI). I already know the basics of Java is that usefull or have I to start from beginning? best regards

Member Avatar for np complete
-1
121
Member Avatar for I_m_rude

hi.. can anybody please tell me that how can i print the execution time for my code ? Actually, what exaclty i want is that my program should also print the time which is elapsed while executing it or for maupulating any i/p. any pre-defined or user-defind function which can …

Member Avatar for I_m_rude
0
107
Member Avatar for gemanthony.gonzales

#include <stdio.h> #include <stdio.h> #include <stdlib.h> #define p printf #define s scanf int total( int q, int w); void gemar(void); void gem(void); int setfunction (int *team1score,int *team2score); static int team1score_set1 ; static int counter1_set1 = 0; static int team2score_set1 ; static int counter2_set1 = 0; static int team1score_set2 ; static …

Member Avatar for I_m_rude
0
215
Member Avatar for manishanibhwani

can anyone tell the output of following code and also explain it #include<stdio.h> #include<stdlib.h> union employee { char name[15]; int age; float salary; }; const union employee e1; int main() { strcpy(e1.name, "K"); printf("%s %d %f", e1.name, e1.age, e1.salary); return 0; }

Member Avatar for I_m_rude
0
109
Member Avatar for ronnel09

Is main(); function included as loop statement? for example i have a program with subprograms then if I finished a subprogram i will use main(); function to go back from the main program. is that considered as loop? thanks!!

Member Avatar for _avishek
0
108
Member Avatar for gAb1

Hi, first i need to download a good compiler, what can you recommend me? I always used dev-c++ but in windows 8 don't work, it gives this error: "gcc.exe: Internal error: Aborted (program collect2)". Well, i need to get content from json files to make a sql sentence, insert into. …

Member Avatar for _avishek
0
200
Member Avatar for Shashank clic

** # is it possible to creat threads in c-programming? # ** ## Sub-Heading Here ## yes,then how? no, then why not?

Member Avatar for nmaillet
0
111
Member Avatar for bharath744

Hello, I have an array string as character[i] = "john" Now, when i supply 'o', it should return me the array index from above as '1'. 'j' as 0 'o' as 1 'h' as 2, etc. Please help

Member Avatar for myk45
0
41
Member Avatar for myk45

Hi all! This is w.r.t the thread [How to make my C++ program executable on other computers](http://www.daniweb.com/software-development/cpp/threads/431194/how-to-make-my-c-program-executable-on-other-computers) I didn't want to continue the discussion there, so i created the new thread. I had faced the same problems in the past. I needed some clarification on the following: 1)`The option shown …

Member Avatar for myk45
0
319
Member Avatar for dineo.makgaretsa

Hi I'm a new in this programming thing and I have to create a car plantation management system yet I'm lost on how to out it together and if I should be using classes in my app

Member Avatar for hericles
0
61
Member Avatar for Gaiety

I have some strange problem which i started facing from yesterday. i have used GDB many times on my system , but yesterday when i started running GDB , my dubugger is enterings the library functions code part also which is very irritating for me. I mean if the program …

Member Avatar for _avishek
0
642
Member Avatar for piero.costa

Hi guys, I'm facing a new problem. Now I'm learning how to send signals to process in order to make them communicate. I was trying to create a process and when this process is created, send a signal to his father... But I had no success. I get a bunch …

Member Avatar for rubberman
0
757
Member Avatar for billionair

I'm trying to make a C program to run DOS commands but I keep getting "illegal command" error. Here's the code. #include<stdio.h> #include<process.h> int main() { system("ipconfig/all"); return 0; }

Member Avatar for Ancient Dragon
0
847
Member Avatar for Orymeyer

Considering the following lines of C code: #include <stdio.h> #include <stdlib.h> #include <ctype.h> void print_upper(char *string); int main() { char s[80]; printf("enter a string\n"); gets(s); print_upper(s); printf("\ns is now in upper case: %s",s); return 0; } void print_upper(char *string) { register int t; int k; for(t=0;string[t];++t) { string[t]=toupper(string[t]); putchar(string[t]); } …

Member Avatar for Vish0203
0
146
Member Avatar for I_m_rude

hi... Can anyone please explain that why we always take 6 points into consideration while finding closet pair of points in a given set of points ?This problem is solved using divide and conquer algorithm. And if anyone please give me psuedo code for closest pair problem, then i will …

Member Avatar for I_m_rude
0
182
Member Avatar for kovacsakos

I should write a program for school classification. It should give out all the 5 marks, but nobody can be on the border points or near the border points. Thanks in advance for your help!

Member Avatar for WaltP
0
120
Member Avatar for chai1234
Member Avatar for Nivashini1992

hello guys, I 've just recently stated writing algorithms in Data structures. I want questions to write algorithms in array and linked list, please give me questions in that. The questions can be of difficulty level easy and medium. thank u.

Member Avatar for I_m_rude
0
83
Member Avatar for n3red

I have Google'd and all i found was outdated, buggy or not working source samples. Here is what i tried but i have a bit of a problem: [CODE]void toDecimal(char bin[]){ int i, d = 0; int l = strlen(bin)-1; int x = 1; for(i = 0; i < l; …

Member Avatar for Rajkumarautit
0
333
Member Avatar for Chatthanz

This is a Simple one Line code for inserting current System date in to a text box: protected void Page_Load(object sender, EventArgs e) { TextBox1.Text = DateTime.Now.ToString("dd/MM/yyyy"); }

Member Avatar for Mike Askew
0
151
Member Avatar for johnray31

hello friends, could you guide me how i can write my own version of malloc and free function

Member Avatar for np complete
0
1K
Member Avatar for kudakwashe.kadzungura

help me with a c program that inputs a year number and number of years,then to determine which of those years were leap years

Member Avatar for np complete
0
120
Member Avatar for rithish

#include <stdio.h> #include <stdlib.h> int fact(int); int main() { int n,total=1,i; printf("enter the series limit: "); scanf("%d",&n); total=total+n; for(i=2;i<=n;i+=2) { total=total+(pow(n,i)\fact(i)); } printf("%d",total); return 0; } int fact(int c) { int j=1; int facto=1; for(j=1;j<=c;j++) { facto=facto*j; } return facto; } my output should be like this 1+n+n*n\2!+n*n*n*n\4! the error …

Member Avatar for _avishek
0
100
Member Avatar for ronnel09

i just want to ask if you know a formula, or just VERY SIMPLE codes on how to compute days between two dates? i really don't have an idea on how to make it. thank you!

Member Avatar for rubberman
0
102
Member Avatar for bugstalker

Being an experience programmer (fortran and assembly), I decided to modernize my resume and tackle c. In the process, I learned that like other programming languages, there were many 'versions' of c. Several course books I read use the conio.h header file. I was looking for a substitute for conio.h …

Member Avatar for Ancient Dragon
1
1K
Member Avatar for _avishek

My understanding of the C language is that the same identifier cannot be reused. However, the code below compiles on GCC without complaints, even when using the "-Wall -pedantic" flags. Is there something that I am missing? Does the standard say anything about functions/macros having the same name as typedef'd …

Member Avatar for _avishek
0
238
Member Avatar for ronnel09

How can i do scanf's in just one line? because example first i will input a number then i will press enter then the cursor will go to the next line. how can i maintain the cursor in just one line? thank you

Member Avatar for deceptikon
0
234
Member Avatar for shanki himanshu

int i; float *pf; pf = (float *)&i; *pf = 100.00; printf("\n %d", i);

Member Avatar for _avishek
-1
118
Member Avatar for ronnel09

i just wanna ask if can i format centered the outputs of turbo c? just like when you do in microsoft word. thank you!

Member Avatar for WaltP
0
301
Member Avatar for chandnigandhi
Member Avatar for np complete
0
181
Member Avatar for c_program_user

I am trying to pass a pointer to a 3D array to a function in which I want to access an array element using pointer arithmetic. Define the array: const unsigned char TS_list_string[2][2][3] = { "abc", "def", "ghi", "jkl", }; Define the function void process_ts(const unsigned char *T1) { unsigned …

Member Avatar for c_program_user
0
178
Member Avatar for kovacsakos

I have an array with a lot of numbers. How can I create intervals from these numbers?

Member Avatar for WaltP
0
141
Member Avatar for shanki himanshu

are these declaration same? const char *const s; char const *const s;

Member Avatar for sepp2k
0
60
Member Avatar for nabeelbhutto

any one help me how can i do this plz plz guyz help me don't say do it by your self i could'nt understand thats why i am asking from you if i know then why i ask i don't know thats why i am asking friends plz help me...!! …

Member Avatar for sfuo
0
732
Member Avatar for zeusprog

As usual I know I'm probably doing something stupid. I'm trying to write the program below but I seem to have handled my queue incorrectly. The problem could be in one of three places; the way i handle moving on to the next node, my addboard function or my printsol …

0
109

The End.