15,551 Topics

Member Avatar for
Member Avatar for Stefan_2

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 …

Member Avatar for rubberman
0
154
Member Avatar for supermastereu

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 == …

Member Avatar for rana ranjit
0
142
Member Avatar for tapananand

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 …

Member Avatar for tapananand
0
302
Member Avatar for supermastereu

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 …

Member Avatar for rana ranjit
0
316
Member Avatar for eskalemberg00

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 …

Member Avatar for Ancient Dragon
0
123
Member Avatar for ITPT

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, …

Member Avatar for ITPT
0
196
Member Avatar for iamsmooth

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 …

Member Avatar for griswolf
0
289
Member Avatar for nill
Member Avatar for srivardhanms

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 …

Member Avatar for srivardhanms
0
1K
Member Avatar for mixmagz

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, …

Member Avatar for mkamrul
0
1K
Member Avatar for maxmiller712

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 …

Member Avatar for Ancient Dragon
0
349
Member Avatar for jchelpneeded

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?

Member Avatar for David W
0
161
Member Avatar for new2code

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 …

Member Avatar for jwenting
0
211
Member Avatar for pheonixkid

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 …

Member Avatar for L7Sqr
0
373
Member Avatar for kid.coder

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 …

Member Avatar for L7Sqr
0
611
Member Avatar for ravi_14

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

Member Avatar for ravi_14
0
115
Member Avatar for example868

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 // …

Member Avatar for example868
0
571
Member Avatar for omar.ossama.11

` #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 …

Member Avatar for fahadkhan6302
0
167
Member Avatar for GuitarComet

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. …

Member Avatar for Ömer
0
318
Member Avatar for anar.bataa

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 …

0
157
Member Avatar for coding101
Member Avatar for Hiroshe
0
122
Member Avatar for Mr.UNOwen

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 …

Member Avatar for omarcharolin
0
10K
Member Avatar for mustafa.bahaa

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 …

Member Avatar for Ayrton C.
0
391
Member Avatar for cambalinho

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?

Member Avatar for cambalinho
0
3K
Member Avatar for mustafa.bahaa

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 …

Member Avatar for Hiroshe
0
158
Member Avatar for jdc5419

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

Member Avatar for ddanbe
0
69
Member Avatar for coding101

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.

0
131
Member Avatar for XodoX

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 …

0
124
Member Avatar for MasterHacker110

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 …

Member Avatar for MasterHacker110
0
320
Member Avatar for finders

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 …

Member Avatar for Hiroshe
0
137

The End.