15,550 Topics

Member Avatar for
Member Avatar for vandna

hey i tried to make a program to find an item in an integer array using binary search technique n by iteration with the help of functions...but i am getting errors....so plz help me out..

Member Avatar for Grn Xtrm
-2
130
Member Avatar for needhelpe

how can I make a program that inputs the month and year. and then should output the days of the month. -january, march, may, july, august, october, and dicember have 31 days. -april, june, september, and november have 30 days. -february has 28 days in non-leap years and 29 in …

Member Avatar for OSiRiSsk
0
165
Member Avatar for indyasbest
Member Avatar for SecurExpert

I wish to write a program that works in the background, i.e. without showing any windows. Someone prescribed i try this: <code> #include <windows.h> int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { while(1) { Sleep(1000); } return 0; } <code> but its not working. it still shows …

Member Avatar for SecurExpert
0
123
Member Avatar for asmahaque_456

How will i convert this binary code"10110111" into decimal value? I have used the following codes [code=c] #include <stdio.h> main() { int n,track,sum,num; printf("number: "); scanf("%d%d%d%d%d%d%d%d%d%d%d", &n1, &n2, &n3, &n4, &n5, &n6, &n7, &n8, &n9, &n10, &n11); { sum=0; num='n1'*2+'n1'; sum=sum+num; } }[/code]

Member Avatar for WaltP
-2
110
Member Avatar for speedy94519

Hello you guys. Im writing a program that calculates 4 parameters: velocity, acceleration, distance, time. Part of my program is to implement an output that adds all the times and prints it into min and seconds and the type that im working with is float. The problem that im having …

Member Avatar for yellowSnow
0
84
Member Avatar for kotiloli

ı have a hw about multiplying [COLOR="Red"] very large[/COLOR] numbers.For example we can't use standart data types for multiplying two numbers which have twenty digits two each.So the doctor wants me to achieve that by[COLOR="Red"] Link List.[/COLOR] i'm responsible that holding these large numbers (multiplicand,multiplier and result) in link list.And …

Member Avatar for yellowSnow
0
113
Member Avatar for newcpp

I have a question: [CODE]#include <stdio.h> char * chstrswithf(char * a) { while(*a!='\0') { if(*a=='s') *a='f'; a++; } return a; } int main(void) { char string[]="this is a string"; chstrswithf(string); printf("%s \n",string); return 0; }[/CODE] the code above is ok for running. but when I replace the [COLOR="Red"]char string[]="this is …

Member Avatar for gerard4143
0
84
Member Avatar for cmsc

I have this linked list. I am sorting the names of the contacts. The head and middle insert part are already working, but when I need to insert in the tail part, the program won't continue, I don't know why. Please Help. Thanks! here's the code : [CODE] #include<stdio.h> typedef …

0
69
Member Avatar for MichaelSammels

Yeah, I'm stumped on this one: I need to get user input from a keyboard, with some problems involved: [LIST=1] [*]I'm using an OS I created [*]I do not have access to any standard includes [*]I need to code the function myself [*]I'm in protected mode [/LIST] Any help would …

Member Avatar for MichaelSammels
0
100
Member Avatar for M1cH

Hai2... everyone... who's in this forum... I'm Michael from Indonesia... I want to ask... How to Call Microsoft Visual C 6.0 Object file from Borland Delphi 7.0?? Please Response... Thank You. SNIP

0
42
Member Avatar for nagaa
Member Avatar for banders7

Code written and tested using the Borland C++ compiler. Code uses access() to determine if an input string exists either as a directory name or as a file name. If access() fails, the string is neither a file or directory and the function terminates. If it does exist, the name …

0
209
Member Avatar for needhelpe

HEY I JUST NEED TO PUT THE FOLLOWING: IF((N == 2) && (T CAN'T BE DIVIDED BY 4)) how can I put: CAN'T BE DIVIDED BY 4? I know divided by 4 is : (t / 4). but can not be divided by 4?

Member Avatar for shuva
0
123
Member Avatar for OSiRiSsk

Hello, i have trouble with creating funkction that will remove white spaces if they are more than 1 in a row i have created this function so far [CODE=c]void VymazBiele() { int c; while ( (c = getchar() ) != EOF ) { if (isspace(c)) { putchar(' '); while ( …

Member Avatar for OSiRiSsk
0
538
Member Avatar for StaticX

Hi, Im having a bit of trouble with a problem: Basically, I have an array with a set size,for example [CODE]my_array[40][/CODE] I am trying to figure out how to tell if it has less than 20 characters filled,and if it has more than 20 characters filled. I have tried the …

Member Avatar for Tom Gunn
0
129
Member Avatar for th3learner

#include<conio.h> #include<stdio.h> main() { int a,b,c; clrscr(); printf("enter your first value:"); scanf("%d",&a); printf("enter your second value:"); scanf("%d",&b); printf("enter your third value:"); scanf("%d",c); if(a>b && a>c) { printf("first value is greater"); } else if(b>a&&b>c) { printf("2nd value is greater"); } else if(c>a&&c>b) { printf("third value is greater"); } getch(); Code runs …

Member Avatar for Gaiety
0
107
Member Avatar for pocku

I've just started started socket programming so there's a few things I'm wondering about: I found a set of socket programming codes here: [URL="http://cs.baylor.edu/~donahoo/practical/CSockets/textcode.html"]http://cs.baylor.edu/~donahoo/practical/CSockets/textcode.html[/URL] And the thing I don't really get is here in TCPEchoClient.c: [CODE]while (totalBytesRcvd < echoStringLen) { /* Receive up to the buffer size (minus 1 to …

Member Avatar for nirveshverma
0
177
Member Avatar for jcarlos.alvarez

Hi, I have 2 hexa arrays of 8 bytes and need to do an xor of them, something like this: [CODE=C] unsigned char xorBufferTemp[8]; unsigned char bufferHexas1[8]; unsigned char bufferHexas2[8]; [/CODE] I'd like to make something like that ... [CODE=C] for (i=0; i<8> i++) { xorBufferTemp[i] = bufferHexas1[i] ^ bufferHexas2[i]; …

Member Avatar for jcarlos.alvarez
0
187
Member Avatar for needhelpe

th program i made does not work!!! it should input an integer between 1 and 9. and then output a palindrome. for example if i input 5, the output should be 123454321. if i input 1, it should output 1. and so on... this is the program i made: #include …

Member Avatar for WaltP
0
115
Member Avatar for needhelpe

hello! I just made a palindrome. that inputs an integer between 1 and 9, and should output: for example if i imput 5 output :123454321 if i input 1 output: 1

Member Avatar for needhelpe
0
84
Member Avatar for jcarlos.alvarez

Please I need a help only in ansi c. I have an array of hexa values, for example: int N=3; char myHexas[N]; myHexas[0]=0x12; myHexas[1]=0x34; myHexas[2]=0xAB; I need to have a new array with the following: myStrings[N*2]; myStrings[0]='1'; myStrings[1]='2'; myStrings[2]='3'; myStrings[3]='4'; myStrings[4]='A'; myStrings[5]='B'; Any ideas should be great. Thanks in advance, …

Member Avatar for jcarlos.alvarez
0
200
Member Avatar for jjepoy

can someone tell me what those %7 and %4 means? I've tried solving it using calculator but my answers are really different from this code? [code]#include<stdio.h> main () { int year=1996, daycode; daycode=((year-1)*365+((year-1)/4)-((year-1)/100)+((year-1)/400)+1)%7; printf("%d",daycode); } [/code] and also this one [code]#include<stdio.h> main () { int year=1996, leapyear; leapyear=(!(year%4)&&(year%100))||!(year%4); printf("%d",leapyear); } …

Member Avatar for Grn Xtrm
0
107
Member Avatar for Nitricity

Hi i am writing a program to convert a user entered integer number into its binary representation, the aim is to repeatedly ask the user to enter a value then output the number in binary and when 9999 is entered end program, i've managed to make it work with positive …

Member Avatar for Nitricity
0
1K
Member Avatar for claire89

im trying to separate words from a sting, whem the code replaces the space for the ' \0' i need to increment the "pos" so i can continue read the array the code so far is this [CODE= c] #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 100 void separa_pal(char …

Member Avatar for csurfer
0
88
Member Avatar for panagos

I finnaly got working the program with <ncurses.h> in the virtual box that i put Ubuntu. A test program for handling the screen is given to us, [U]this:[/U] [CODE]#include <ncurses.h> int main(int argc, char **argv) { int X = 10; int Y = 10; int ch; initscr(); noecho(); keypad(stdscr,TRUE); move(Y, …

Member Avatar for dkalita
0
220
Member Avatar for ubi_ct83

hello guys, i have this code in java.but i need to convert to c.but i dont know java at all.hope u can help me.thanks for advance [CODE] public class Main { static int t_value=2; static int no_of_parameter = 0; String binary_setting; static int data[]; static ArrayList<String> constraint = new ArrayList<String>(); …

Member Avatar for yellowSnow
0
99
Member Avatar for arasucute

0,0 0,w-4 0,w +------------------------------------------------------+---+ | My Window | x | 2,0+------------------------------------------------------+---+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | …

Member Avatar for Ancient Dragon
0
167
Member Avatar for arasucute

0,0 0,w-4 0,w +------------------------------------------------------+---+ | My Window | x | 2,0+------------------------------------------------------+---+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | …

Member Avatar for Grn Xtrm
-1
180
Member Avatar for siggivara

Hi. I have this codeline: [CODE=c]fprintf(file, "The\necake\nis\na\nlie");[/CODE] When I compile and run in Linux it outputs nicely like so: The cake is a lie but when I compile and run in Windows (Vista), using cygwin, the newline doesn't work and output is like this: Thecakeisalie Anybody have an idea why?

Member Avatar for Tom Gunn
0
665

The End.