15,552 Topics
| |
Displays which partitions are on which physical hard drives and shows partition starting offset and length. Developed and tested under XP using a Borland C++ compiler. Code is not provided for the private includes, but changes to make to code work are trival. References to werrtxt() and format() can be … | |
How can I Write a C language routine that defines a function mult(). The function mult() is supposed to perform scalar multiplication on the two vectors ‘a’ and ‘b’, and returns the vector ‘c’, such that c=a.b. Also, it pads zeros ‘0’ to the smaller of the two input vectors … | |
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.. | |
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 … | |
| |
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 … | |
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] | |
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 … | |
ı 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 … | |
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 … | |
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 … | |
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 … | |
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 | |
what is the difference between fread() and fgets()? | |
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 … | |
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? | |
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 ( … | |
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 … | |
#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 … | |
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 … | |
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]; … | |
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 … | |
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 | |
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, … | |
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); } … | |
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 … | |
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 … | |
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, … | |
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>(); … | |
0,0 0,w-4 0,w +------------------------------------------------------+---+ | My Window | x | 2,0+------------------------------------------------------+---+ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | … |
The End.