19,876 Topics

Member Avatar for
Member Avatar for charlowiz

Design and code a program in c that converts time in seconds to hours, minutes and seconds and display the results. Implement using pointers and functions. You should have at least the following functions. • Reading time in seconds. • Converting seconds to hrs, mins, secs. • Displaying results hrs, …

Member Avatar for deceptikon
0
154
Member Avatar for Aadhya169

Hello members... How are you all ??? I just started the programming and want to learn C for that.. so please tell me the best book to learn the C from the starting... Thank you in advance......

Member Avatar for whitech
-1
298
Member Avatar for mesbahuk

In java this is how a DerivedClass can implement it's BaseClass's constructor. public DerivedClass extends BaseClass { //some properties public DerivedClass(param) { super(param); } } I have learnt C-Sharp's *base()* does the similar thing, but when I replace *super(param)* with *base(param)*, it does not gives what I'm expecting. How can …

Member Avatar for Ketsuekiame
0
271
Member Avatar for shadyreal

Is it possible to have a auto-tracking event or something similar to track the database when it changes? For an example: If the database gets a new insert value from another application that I currently have: then My other application will notice it and fetch that data instead of getting …

Member Avatar for shadyreal
0
449
Member Avatar for Arroway

I have to make a program that calculates the integral of a function using the simpsons method and the trapezoid method. It works just fine on my computer using MinGW, but when I try to compile it in my uni's computer (GNU OS) I get: It = 0 (should be …

Member Avatar for rubberman
0
184
Member Avatar for prakhs

I have an array of elements. Think each of the element as competitors, and a tournament is going to rank them. The output of the program is showing elements at each level. Here's the code: #include <stdio.h> #include <stdlib.h> bool isPowerOfTwo (int x) { /* First x in the below …

Member Avatar for iamthwee
0
249
Member Avatar for eladt

I need help writing a function to convert hex to arabic string to Example get string this : "D8B1D8B5D98AD8AFD8A7D984D8B1D982D985" and return this : رصيد الرقم in english-(Balance figure). **only c code** TNX

Member Avatar for Adak
0
2K
Member Avatar for deceptikon

I was asked this in an interview today: Q: `malloc(0); /* What does it do? */` It's a great question because it covers a subtlety in the standard and a condition that not many people will consider. Unfortunately, I wasn't 100% confident that I remembered what the standard said about …

Member Avatar for deceptikon
5
224
Member Avatar for danibootstrap

Hi, Is there a simple and small code for client and server to talk to each other over TCP/IP (windows sockets)?Please let me know.

Member Avatar for funtom
0
346
Member Avatar for jose.a.rueda.5

Hi! I have this kind of project and im really needing help for it. The compiling and print have to be a spiral matrix. it must start in the center and then move to the right and then up and then to the left, making a spiral. I have to …

Member Avatar for jose.a.rueda.5
0
161
Member Avatar for baby_c

Hi all, I wanted to create a computer warm which create a file all over a network for learning purpose. But have no idea where to start. Can anyone guide me through how to create a simple one?. Any examples would be great.. thanks..

Member Avatar for pritaeas
0
107
Member Avatar for costy.bogdan

Hello, I'm a newbie in C/C++ programming and I wonder if you can make me understand the following, I have a small c++ statement, and the result is somehow weird for me: `char[10] arr="torino", *ptr; `ptr = arr;` `cout<<*&*&ptr;` and the result gives me the entire string.... PS: This is …

Member Avatar for costy.bogdan
0
121
Member Avatar for nitin1

int m= i++ || ++j && k--; where i=2, j=3, amd k=5; acooridng to me, it will be executed left to right and then values of m=1, i=3, j=3 and k=5. but i have seen that precednace of && is more than || , than so how this expression is …

Member Avatar for Banfa
0
312
Member Avatar for suncica2222

Can someone coment this code in detail, I can't quite understand algorithm behind this? typedef struct node{ int x; int y; int value; struct node* row; struct node* col; }node; typedef struct matrix{ int height; int width; node** rowList; node** colList; }matrix; void insert(matrix** M, int row_index, int col_index, int …

0
143
Member Avatar for Jenniferting

Hi guys, im currently doing Conway's game of life and i'm almost there. The variable and all is in German since im studying here in Germany but i think one can still understand the code. There's one thing I need help with, which is with the Glider (Gleiter). When i …

Member Avatar for sepp2k
0
253
Member Avatar for nitin1

#include<stdio.h> void f(int n) { char pp[n]; printf("%d\n",sizeof(pp)); } int main() { int n; scanf("%d",&n); f(n); } In this program the size of array is defined at runtime,and sizeof operator is printing correct size after runtime initialisation in gcc 4.4. Can anybody explain? we say that sizeof is compile time …

Member Avatar for sepp2k
0
189
Member Avatar for lolo nice

Q1: and then breaks that number down to display the equivalent minutes and seconds. Have your program ONLY do the calculation if the user enters a number LESS than 50,000 hours.number of hours, If he enters 50,000 or more print an error message and quit.Write a C++ program that reads …

Member Avatar for Ancient Dragon
0
163
Member Avatar for mesbahuk

In the conversion process of a java to c# project, i have come to java's ***indexOf()*** function in ***string.java*** class, which takes in two integers (int ch, int fromIndex) and return some integer value for a char (i'm guessing its an ASCII value). I need to know if there is …

Member Avatar for mesbahuk
0
665
Member Avatar for Eyobed Paul

develop a c++ program for length conversions. The program should have a menu so that the user can select the type of length conversion by typing a value between 1 and 8 as follows: 1.centimeter to other units 2.Meter to other units 3.Kilo meter to other units 4.feet to other …

Member Avatar for rubberman
-1
130
Member Avatar for dxprogrammer

/* This is source code of function which solves sudoku, function returns 1 if solution exists and 0 if not exist. In case if solution exists, you have resolution in entry parameter of this function You can run this function in function main() eg. if(sudoku(T)) print(T); where print(T) is group …

Member Avatar for nitin1
-1
254
Member Avatar for aplh_ucsc

I'm using visual studio 2010 and C# and this is the Implementation of a WPF button. IT takes two textbox values and insert them into a database table. i did create a service based database and the did configure it on app.config file. Table has two columns, product id(int) and …

Member Avatar for itzcuinzin
0
477
Member Avatar for Rahul47

Hi folks, I recently started using lcc compiler for C, and am having diffculty in compiling and executing my programs.Each time I make a new file using File --> New --> File, I am not able to compile current file. The previous file which was opened gets compiled and exectued. …

0
69
Member Avatar for thechett22

I need help with this problem. I just don't know what to do. float price=56.95; float tax=1.05; float total=0; total=price*tax; print total; Output_____________________________ My professor wants me to determine what is printed in the output statement at the end and than do a corresponding flowchart. Can anyone help me please.

Member Avatar for munna.shk
0
98
Member Avatar for jesskavidja

I have a bit of a baffling problem! I'm writing a tag matcher in XML and whenever I run the below procedure, I get a garbage value after the name of every tag **except for the first one**. When I add the array text to the parameters list, the garbage …

Member Avatar for rubberman
0
296
Member Avatar for arslan.maqsood1

Question#1Senior salesperson is paid RS.400 a wek, and a junior salesperson is pair RS.275 a week.Write a program that accepts as input a salesperson's status in the character vaiable status is's' or "S" the seniors person's salery should be displayed;if status is 'j' and 'J',the junior person's salery should be …

Member Avatar for rubberman
0
147
Member Avatar for Smeagel13

Take the following C structure: typedef struct dataPoint { tick * tickData; struct dataPoint * previousDataPoint; struct dataPoint * nextDataPoint; } dataPoint; Compiling on a 64-bit system with 8-byte words, this structure takes up 24 bytes (3 words) of memory. 24 % 8 = 0 ... so it is word …

Member Avatar for Smeagel13
0
296
Member Avatar for nitin1

a linked list is given, and a only pointer to a node is given which need to be deleted. it is singly linked list. you dnt have accees to any other pointer like head or what. you only have that node pointer in ur hand. thanks.

Member Avatar for deceptikon
-1
139
Member Avatar for nitin1

i have thought a lot on this. but not getting O(n) solution. given n URL's and you have to find the unique URL in that (if there is any). you have to print that URL. thanks. O(n2) solution is a stupid solution, some O(n) is acheivable, but not getting how …

Member Avatar for deceptikon
0
128
Member Avatar for geethik

may any one suggest some sample code how to store the video file frame data into arrays by programming in C....

Member Avatar for geethik
0
331
Member Avatar for isha.dakhara

i have got a c++ project to work on and the topic is shopping....i have to get something and neww added to it and the whole code is needed....

Member Avatar for rubberman
0
165
Member Avatar for daniel1977

Im having a problem with the following exercise. I have the whole program working, however, the transaction time is not passing to the customer. The only element that this affects is the time that the customer leaves. Anny assistance would be greatly appreciated. Best, Dani Below are the 5 files …

Member Avatar for dexblack_1
0
624
Member Avatar for GhostWolf

I'm trying to learn, and have run into a little difficulty. Trying to add a class to my program, passing a structure as the parameter to the class, and get "The best overload method match...has some invalid arguments" error message - and I just plain don't understand it! // in …

Member Avatar for tinstaafl
0
377
Member Avatar for lemongardens

hi ı have an exam can you give some examples about win32 especially main part of programme thnks

Member Avatar for Ancient Dragon
0
134
Member Avatar for shadyreal

Hi Im a student and just started 3D programming 2 weeks ago. I have this problem: I got a working collision detection against models created in Maya. But: The collision is only inside the model, with the normals on the model pointing out as it should be. If I revers …

Member Avatar for shadyreal
0
269
Member Avatar for wauspe

int my_filewrite(char *question) { char filename[100]; int fd; printf(question); scanf("%s", filename); if (strlen(filename) > 100) } return 0; please can you help to find potential vulnerabilities in this code? Thank you.

Member Avatar for Ezzaral
0
170
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
201
Member Avatar for yashdeshmukh

How can we implement polymorphism in a C++ program that connected to a MS Database(the program is storing the details of employees of a school)

Member Avatar for rubberman
0
138
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
204
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
249
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
120
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
141
Member Avatar for motlatsisehole

can u please help me, i have a question on classes that says, implement a matrix class that using dynamic memory allocation to add,subtract,multiply, display diagonals and deternimant, two matrices.

Member Avatar for Ancient Dragon
0
141
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
776
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
124
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
146
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
198
Member Avatar for ToniSoft

class Program {class Program { static void Main() { int TotalCoffeCost = 0; Start: Console.WriteLine("**Caffe Menu**\n\n1-Small = 1$, \n2-Medium =2$, \n3-Large"); Console.WriteLine("-------------------------------------------------------------"); int UserChoice = int.Parse(Console.ReadLine()); switch (UserChoice) { case 1: TotalCoffeCost += 1; break; case 2: TotalCoffeCost += 2; break; case 3: TotalCoffeCost += 3; break; default: Console.WriteLine("Your Choice …

Member Avatar for ddanbe
0
213
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
224
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
221
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
202

The End.