15,540 Topics

Member Avatar for
Member Avatar for neeludhiman

Hi friends, Can anyone tell me how can we get message boxes (e.g, with buttons OK, Cancel) in C ? Please guide. Thanks, Neelu

Member Avatar for rishabh413
1
16K
Member Avatar for shubham.joy

[CODE=c]#include <stdio.h> #define max( a, b) a > b ? a:b int main() { int i, j = 10; int k = 15; for( i = 0; i < max( j, k ); i++ ) { printf( "\nhi" ); } return 0; } [/CODE] The above code generates an infinite …

Member Avatar for nezachem
0
244
Member Avatar for shantanusinghal

My distributed operating system lab requires me to implement the election algorithm (bully and ring) in c. My current idea is to run several instances of an ouput file on different terminal, each symbolizing a different process. Now i'm facing the following problem and if you guys could just point …

Member Avatar for DeanMSands3
0
297
Member Avatar for DarkMonarch

hey guys, i have some work to do in C on a windows platform, windows 7 actually. now i've look into the suggested IDE compiler combo you guys suggested and i've pickup Dev c++ i just type a test program, just to see how the compiler works [CODE] #include <stdio.h> …

Member Avatar for DarkMonarch
0
255
Member Avatar for sync101

Hello, my assignment is to write a postfix calculator. I have written the program. It works well, except for when the user enters in an error. Lets say, user enters "2 A +" it changes the A to a '0'. Which it shouldn't be doing. I have tried strtol() as …

Member Avatar for WaltP
0
183
Member Avatar for see_moonlight

what function can delete a space in a string? i want to find a c function , e.g. delspace(char *string) string = "abc d e" and delspace(string)-> "abcde" thanks, i want C function

Member Avatar for isaacws
0
565
Member Avatar for gourav1

my teacher has told me to make a flag(India's national flag) in C using lines, bar and all. then fill colors. i have done this thing when i am writing this thread. now, he also told me now that the flag should look like as if it waving in the …

Member Avatar for DeanMSands3
0
1K
Member Avatar for Bladtman242

Obviously I have some wrong assumptions, because this prints "strsize = 8" no matter what. I realize my use of system() might be misguided, so if you have comments on that don't hold back, just please help out with the string-thing aswell : ) BTW it's a 'wrapper' for shell …

Member Avatar for Bladtman242
0
173
Member Avatar for joy39

if we have to insert records into a mysql database using c api then the general code is this [CODE]if (mysql_query(conn, "insert into empinfo values ('saikat banerjee')")) { printf("4Error %u: %s\n", mysql_errno(conn), mysql_error(conn)); exit(1); } [/CODE] but, here we have to enter the record from the code itself . but, …

Member Avatar for fobos
0
146
Member Avatar for samidha

[code] #include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> #define M 20 #define hr printf("\n----------------------------"); #define br printf("\n"); int mptr=0,pptr=0,sptr=0; struct input_code { char lbl[M]; char instr[M]; char op1[M]; char op2[M]; }input[M]; struct opcode_table { int num; char name[M]; int code; struct opcode_table *chain; }mot[26],pot[26]; struct symbol_table { int num; char sym[M]; int addr; …

0
121
Member Avatar for raj236712

i want to create shapes like circles,rectangles and others with the help of c language programming.basically i want to make the sign of matrix in my program.how can i do this?

Member Avatar for WaltP
0
572
Member Avatar for HadoukenGr

[CODE]#include<stdio.h> #include<string.h> void FindWord (char used[30] , char string[30] , int wordsize); char* CleanString (char string[30], int wordsize); int main (void) { FILE *fp; char letters[30]; char words[30]; char used[30]; char *string; int wordsize; int input_size; input_size = wordsize = 0; fp = fopen("dictionary.txt","r");/*contains a list of words in the …

Member Avatar for HadoukenGr
0
134
Member Avatar for mackieben04

I Having Problems with my program. I hope someone will help me with my problems. By the way, I need help regarding Going Back to Menu using Loop. Thank you very much! if you have seen any problems, please post your message. Thanks! [CODE]#include <stdio.h> void main() { float usd, …

Member Avatar for mackieben04
0
216
Member Avatar for YAMNA MIDHAT

this is my code .can any one please tell me why the program is not giving proper results?? [CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> //2d linked list major aasg#1 //structure type struct items { int id; //item no; char name[]; int price; char color[]; items *previous; items *next; }; //functions sort(); show_all(); …

Member Avatar for ChrisPadgham
-2
163
Member Avatar for dedenfk

I want to know how to write a program to print A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Input = A M output = N z

Member Avatar for Greg_R
0
133
Member Avatar for rafzk

Hello, Iam getting a strange error and I dont know how to solve it. Can you help me? Iam trying to make a dictionaire using BST. [CODE] // Task3.cpp : BST #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <Windows.h> #define cabecalho "---------------------------------------------------------\nDICTIONAIRE\n\nEnglish to Portuguese\n---------------------------------------------------------\n" #define color(y) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), y); #define LEFT …

Member Avatar for rubberman
0
257
Member Avatar for Lowchernhwee

well i check all the web, i still do not know how to save it as a jpg and if possible, load and edit a picture from jpg here is a simple code that i done for drawing...... [CODE]namespace @try { using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using …

Member Avatar for zeroliken
0
144
Member Avatar for theCompiler

can someone please tell me how am i suppose to start my program ? i have 20 integers (1-20) the user will input what number should start and the count interval . its a bit confusing only 5 numbers should be left numbers who are already counted will not be …

Member Avatar for WaltP
0
130
Member Avatar for ahp@aol.in

Hi folks, I've simple question regarding following code. [CODE] int main() { int i =5; printf("%d %d %d\n",i,i++,++i); // 7, 6, 7 return 0; } [/CODE] The answer is [B]7 6 7[/B]. I want to know how it is coming. Please help. Thanks, Amar

Member Avatar for jumbowat
0
787
Member Avatar for mrprassad

[CODE] swap (char *p, char *q) { printf ("%c\t%c\n", *p, *q); *p ^= *q ^= *p ^= *q; printf ("%c\t%c\n", *p, *q); } int main (int argc, char *argv[]) { if (argc < 2) { printf ("\nSyntax: ./a.out str\n\n"); exit (1); } char *p, *q, temp; p = q = …

Member Avatar for Narue
0
151
Member Avatar for srinidelite

#include<stdio.h> int main() { int i; typedef struct BookDB { int iPageNo[10]; char cBookName[10]; } b1[5],*b2; // *pvBookDB = &vBookDB; b2 = &b1; printf("Enter the pageno folloed by bookname for 5 books at at time"); for(i=0;i<=5;i++) { scanf("%d,%s",b2[i].iPageNo,b2[i].cBookName); } for(i=0;i<=5;i++) { printf("%d,%s",b2[i]->iPageNo,b2[i]->cBookName); } return 0; }

Member Avatar for jumbowat
0
138
Member Avatar for trinetra31

Hi, i have to compile some coding to show how dtmf works. Any idea how? I see most of it uses unix c or linux programming? I have only been programming with windows C. Pls do guide me step by step on how to program in these languages. here are …

Member Avatar for BobS0327
0
255
Member Avatar for Ararat

I feel really dumb asking this, but why does this code print b,b instead of b,a? the second strcpy() is supposed to copy "a" and put it inside a[1]... [CODE]#include <stdio.h> #include <string.h> int main(){ char a[100][100] = {"a","b","c","d"}; char*temp = a[0]; strcpy(a[0],a[1]); strcpy(a[1],temp); printf ("%s %s",a[0],a[1]); getchar(); }[/CODE]

Member Avatar for Ararat
0
110
Member Avatar for coding101

Where are the function bodies to functions like socket,bind,accept, etc??... Using the c socket network programming for unix based systems, we use the api, but where are the function bodies to these functions. Im doing network programming, and I fill in the socket functions, bind, accept, write, read, etc, but …

Member Avatar for savoie
0
155
Member Avatar for coding101

I am new to network programming, and trying to read a response from a servers webpage. I can connect, but cannot get the pages source. Heres what I have [CODE] #include <stdio.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netdb.h> int main(int argc,char **args){ if(argc < 2){ printf("2 args\n"); return 1; } …

Member Avatar for savoie
0
120
Member Avatar for Ararat

Hey guys I'm having a little problem with reading from a text file, here's how the text is formatted: [QUOTE]random string$52$44$5$abc random string$52$44$5$abc_def random string$52$44$5$abc_defgh[/QUOTE] this code is what I use to read the text [CODE]#include <stdio.h> #include <conio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> char name[100][100]; char position [100][100]; …

Member Avatar for WaltP
0
146
Member Avatar for Greg_R

I'm writing a small app to do automated testing of a console application. It needs to repeatedly run the app with various options and handle when the app being tested crashes. I started with system(), moved on to spawn() and have since been trying CreateProcess(). It doesn't lockup when the …

Member Avatar for Greg_R
0
421
Member Avatar for YourGamerMom

I am working on an OpenGL project in C using Xcode 3.2.6. It is a tutorial program and yet I am having problems with it. When I double-click Project.app, it opens for a quarter of a second then closes. The source is: [CODE]#import <Cocoa/Cocoa.h> #include <GLUT/GLUT.h> int main(int argc, char …

Member Avatar for YourGamerMom
0
331
Member Avatar for meera_137

I want convert c code into matlab how it is to be done? can I do this to get my best result.plz tell me in details.

Member Avatar for meera_137
-1
97
Member Avatar for Jaks_maths

Returns the largest sum of contiguous integers in the array Example: if the input is (-1, 2, -3, 2, 0, 5, -11), the largest sum is 7 Time complexity is O(n).

Member Avatar for mariola
-1
1K

The End.