15,551 Topics
| |
I was just wandering if there was a way to put information in to a string but increment a section of the text when putting it in the string. To put it simply: [CODE]string="to be put in string[this is to be incremented]";[/CODE] I was wandering if there is a way … | |
Hey, i want to enter a number by user. [CODE]printf("Enter a number: "); scanf("%d",&number);[/CODE] but,user enter text.i mean: [B]Enter a number:[/B] One Now,i want to convert this text to number. [I]I hope,i tell my problem.Sorry my bad english.[/I] | |
please disregard this as i have figured out what was going on. i will delete this as soon as i know how. | |
[CODE]#include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include<dos.h> #include<math.h> union REGS in,out; void hide_mouse(); void show_mouse(); void detect_mouse(); void detect(int*,int*,int*); void main(void) { int gdriver = DETECT, gmode, errorcode; int xmax, ymax; initgraph(&gdriver, &gmode, ""); errorcode = graphresult(); if (errorcode != grOk) { printf("Graphics error: %s\n", grapherrormsg(errorcode)); printf("Press any … | |
Hi there)) I know that one of the ways to pass variables values into thread -is to create a special structure which includes all needed parameters/ But what about getting values from thread? Is it any way to get value after modification from the thread ? I know only one … | |
********* ****s**** ***sss*** **sssss** *sssssss* Where "s" means space.. Need a simple syntax coz I am a new student. Help me fast. I am totally stucked here......... Thanks and best regards, Lost history:) | |
Hello. I am having trouble figuring out how to return the sum. I have 2 files p1.c and p2.c p1.c contains my main which calls createAndCOunt like this: [CODE] printf("The value is %d\n",createAndCount());[/CODE] p1.c also contains count which is called by createAndCOunt count is: [CODE]int count (int* array) { int … | |
Hi friends, Can anyone tell me how can we get message boxes (e.g, with buttons OK, Cancel) in C ? Please guide. Thanks, Neelu | |
[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 … | |
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 … | |
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> … | |
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 … | |
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 | |
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 … | |
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 … | |
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, … | |
[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; … | |
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? | |
[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 … | |
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, … | |
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(); … | |
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 | |
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 … | |
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 … | |
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 … | |
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 | |
[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 = … | |
#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; } | |
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 … | |
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] |
The End.