15,551 Topics
| |
I've just finished my programming course in college and I need some projects or ideas for 'practicing' and making sure I don't forget some part of C programming. I would love for you to either give me some ideas or point me to sites with mini project from easy to … | |
Receive a number from the keyboard and tell you if it is divisible by 10, 5, 2 or if it is not divisible by any of these. Why this dont work? #include <stdio.h> #include <stdlib.h> #include <math.h> main() { int num; printf("number: "); scanf("%d", &num); if (num % 10 == … | |
I guess most of you would have seen the algorithm for the following problem: **Input:** Set of intervals(time) **Output:** Partion of intervals into minimum subsets such that no interval in a subset overlaps. **The Algorithm:** Sort intervals by start times and look them in this order, put each interval in … | |
Calculate the total area and volume occupied by a cylinder. Correct or not? #include <stdio.h> #include <math.h> int main() { float At, V, r, h; printf("\n ===========Calculate the total area and volume occupied by a cylinder============\n"); printf("\n the base radius.......: "); scanf("%f", &r); printf("\n Cylinder height.: "); scanf("%f", &h); At … | |
i need help programming in quincy 2005 its about changing money for example i bought 2 $6 pencil and my money is $1000 grr.. dont know how to explain.. sorry for my bad english.. i forgot my notes at school and i need this code to pass it tommorow grr … | |
Hi I'm trying to undrestand socket functions.... (in C) arguments of bind() and accept() functions is ambiguous for me! signature of bind() : int bind(int sockfd, struct sockaddr *my_addr, int addrlen); // okay, no problem but in example's codes or in the program : bind (sockfd, (struct sockaddr *)& my_addr, … | |
I know there are benchmarking programs that exist, but I've decided that as an exercise, I want to try and create some sort of simple benchmark program to test schedulers of my Raspberry Pi (CFQ, noop, deadline). I have been switching the schedulers and testing some linux commands using time … | |
how can i create my own library in turbo c\c++ compiler (v.3) | |
Hi, I want to write a sniffer program which sniffs the packet from a Unix socket. Is it possible? I have written a small server and client programs using unix socket (sockaddr_un). Now I want to write a sniffer program which sniffs the packet from the socket. Am not able … | |
Here is a code for those who wants Tic Tac Toe [CODE]#include <string.h> #include <stdio.h> #include <conio.h> #include <dos.h> #include <io.h> main() { //_setcursortype(_NOCURSOR); int x1=0, x2=0, x3=0, x4=0, x5=0, x6=0, x7=0, x8=0, x9=0; int o1=0, o2=0, o3=0, o4=0, o5=0, o6=0, o7=0, o8=0, o9=0; int a1=0, a2=0, a3=0, a4=0, a5=0, … | |
Hello guys, i have an .txt file like this -- Brasil Portugal Chile Espanha -- And i have to read this and put it in a array, i've been looking for this all day, but everyone ask me to do this in C++ using getline(), the problem is that i … | |
any suggestions on how to repalce the specific character with a different character within the string while running a loop? I am in a no prereq class and am not really connecting with this programming, any help, suggestions, tips on the specifically the replacment issue? | |
This is my problem. I am taking a class that is designed to be an independant study and the book only touches on the surface of the ideas covered. this code is a project that i am stuck on and cant really find any help anywhere else so i am … | |
I'm trying to parse equations like these which only has two values or the square root of a certain value from a text file: 100+100 -100-100 -(100)+(-100) sqrt(100) by the minues signs, parenthesis and the operator symbol in the middle and the square root, and i have no idea how … | |
Hey i was just writing a simple server i'm using accept() in a loop to emit constant greeting but i dont know why my code stucks at single send() i mean it asks for input only once --> it asks for input --> i give input--> it emits succsfully to … | |
please help me to understand the output void main() { printf("%x",-1<<4); return ; } -1 is represented as **1111 1111** so in hexadecimal form it should be FFh but compiler displays ffff ffff | |
My code is to open a window.(SDK)(dev c++, orwell) Instead of five seconds it takes a few milliseconds. Please help solve the problem. Just few day ago it worked but now ti does'nt. #include "SDL.h" //cool graphics API. Only works with 32 bit for me. #include <stdio.h> typedef struct // … | |
` #include<stdio.h> #define MAXLINE 1000 int getline(char line[],int maxline); void copy(char to[],char from[]); /*print longest input line*/ main() { int len; /*current line length*/ int max; /*maximum length seen so far*/ char line[MAXLINE]; /*current input line*/ char longest[MAXLINE]; /*longest line saved here*/ max=0; while(len=getline(line,MAXLINE)>0) if(len>max) { max=len; copy(longest,line); } if … | |
Hi! I'm working on a hobby OS. Almost every time I try to link my files I get a 'undefined reference to' error. As I've been trying to compile with different compilers, the errors generated by the linker changes. I have only been using different ports of the GNU compilers. … | |
Hi guys i have this code for multicast with encryption and decryption with DES(shared key) i think encryption goes ok but decryption not working and i can't find the problem both codes compiles fine without problem when i execute them encryption works but decryption not PLS HELP ME!!!... here is … | |
Any code to take 2 ascii chars and put into 1 byte? 0x16 = ? byte | |
As all of you can tell from the title, I need help understanding how to communicate to a USB port. Basically I need to send some bits to a usb micro controller and to do so I need to understand how you do it in C for both a Windows … | |
That program output (the chr is not a vowel ) everytime !! even if it's vowel #include <stdio.h> #include <conio.h> int main() { char ch; printf("Input a character\n"); scanf_s("%c", &ch); switch (ch) { case 'a': case 'A': case 'e': case 'E': case 'i': case 'I': case 'o': case 'O': case … | |
i'm trying call the WM_DRAWITEM message from WM_KEYUP message without sucess :( bool KeyPressed(int a) { if(GetAsyncKeyState(a)) { return true; } else { return false; } } //in WM_KEYUP message if(KeyPressed(VK_MENU)==true) SendMessage(hButton, WM_DRAWITEM,NULL,NULL); what i'm doing wrong with SendMessage? | |
Hay guys iam new to c programming and i was trying to do simple do you want to continue loop using do while loop the problem is the program doesn't read the char Y/N and just simply contiune the loop and here is the code what's wrong #include <stdio.h> #include … | |
hello, could you tell me how to send ASCII control codes 8025T fagor controller eg <ENQ> and also read from the controller <DLE> character in c language. thanks | |
Is it possible to parse an ethernet frame to extract an ssl server certificate to determine the common name issued to?...Im not too familair with ssl records. | |
I have a few questions. Server-client code with a (distributed) hash table. Give the peers their own port, own node-ID, predecessor and successor ( node-ID, IP and port of them). That's a snippet of it. port= argv[1]; ownNodeID = atoi(argv[2]); sucNodeID = atoi(argv[3]); sucIP = argv[4]; sucPort = argv[5]; preNodeID … | |
I am working on a little hobby project, it reads user input and then stores it in a pointer to char array. The problem is that the output is not correct. So i dont know if it is the output, or the storing that is wrong. I am used to … | |
I'm working on a rolling dice program. The rules are below. I'm not sure how to **reassign** a value. For example, a value of 1 and 2, would equal 1; a value of 3 and 4, would equal 2; and a value of 5 and 6, would equal 3. The … |
The End.