19,876 Topics
![]() | |
my professor gave this machine problem as a part of our finals.can you help me out/ here are the instructions: 2 player tictactoe -program a 2player tictactoe game wherein two players alternately key-in the coordinates to which they want to place a 'o' or an 'x' -the game board is … | |
This is how mine [B]strcmp[/B] function would look like if I'd to implement it from scratch :) | |
Please help me Create a program to enter and average the high and low temperatures for the week. Create a constant to define the size of two float arrays. Create two one dimensional float arrays in the function main() called highs and lows. const int MAX = 7 … | |
I am trying to create a basic program with a user defined header file.I created the project in visual studio. #test1.cpp # #include <stdio.h> #include "multiply.h" int main() { int y; y=multiply(5,10); printf("%d\n",y); printf("%s","jigar"); getch(); return 0; } # multiply.h # int multiply(int a,int b); # multiply.c # #include "multiply.h" … | |
Hi! i have to *create a game , purely in C Language*. How to start and how to end? what kind of game can i try to make? which IDE to use ? i cant run <graphics.> header file for graphics in any IDE. How to configure init() = (&gm, … | |
How to use c sharp properties and after get value save in sql database. | |
#pragma once #include <fstream> namespace testrun1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; using namespace System::IO; using namespace std; #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { ifstream inputFile; ofstream outputFile; inputFile.open("1.txt"); outputFile.open("sum.txt"); int num1; int num2; … | |
Hi, I having this error and i don't know how to fix it, can anybody help please: "declaration of `c' as multidimensional array must have bounds for all dimensions except the first", i'm getting this error because of : [code]void lcs::LCS_Length(int X[], int Y[], [COLOR=Red]int c[][], char b[][], [/COLOR] int … | |
#include<stdio.h> #include<conio.h> #include<stdlib.h> void main() { char a[100],b[50],c[50]; int i,n,j,k,d; printf("enter the string: "); fgets(a,sizeof(a),stdin); printf("enter the string to be removed: "); fgets(b,sizeof(b),stdin); printf("enter the string to be searched: "); fgets(c,sizeof(c),stdin); for(i=0;a[i]!='\0';i++) { if(a[i]==b[0]) { k=i; printf(" \n the first character is at %d",k); printf("\n lets see whelther searchstring is … | |
My assignmnet is to read a csv into a structure. A few sample lines of the csv look like this: 21, John Henry Blue, 6598 Wish Street, Elves, CA, 54862 9, Chad Vile, 32 Bundle St. , Carver, IN, 28105 I can't use pointers, except to point to the file … | |
1) Write a program to make commandline calculator ? Format like that : excutablefile firstoperand opertator secondoperand Ex : ./a.out 1 + 3 result : 5 | |
#include <stdio.h> #include <stdlib.h> #include<string.h> void main() { char a[200],n,c,b; int i; printf("enter the new string: "); scanf("%20s",a); printf("enter the character to be replaced: "); scanf("%20s",b); printf("enter the new character: "); scanf("%20s",c); for(i=0;a[i]!='\0';i++) { if(b==a[i]) { a[i]=c; } } printf("%s",a); } i have 0 errors when compiler starts to work.it … | |
#include <stdio.h> #include <stdlib.h> void main() { char a[100]; int i,c=0; printf("enter the text: "); scanf("%20s",a); for(i=0;a[i]!='\0';i++) { if(a[i]==32) { c++; } } printf("number of spaces in text is %d",c); } ascii value of space is 32 but it shows o spaces in output | |
![]() | hi... typdef char * hello; const hello ptr1,ptr2; So, in this snippet, my question is that what is constant ? is ptr1 constant or the value to which ptr1 will "point to" will be constant ? and will u please give reason also? my thinking: const hello means (const char … |
![]() | hi, #include<stdio.h> int main() { const int i=10; int *ptr= (int*)&i; printf("%d",*ptr); *ptr=11; printf("%d",*ptr); printf("%d",i); getch(); return 0; } in this, we trickly changed the value of a constant variable. how is it changing the value of i ? in the o/p it is giving o/p , value of i … ![]() |
![]() | hi, int common(node *temp,int c,int d) { int a=0; if(temp==NULL) return 0; else if(temp->a==c || temp->a==d) return 1; a=common(temp->left,c,d)+common(temp->right,c,d); if(a==2) { printf("%d\n",temp->a); // break; return 0; } else return a; } this is my recusrion code. Actually, I want to end this recusrion process by adding some statement where i … ![]() |
![]() | hi, int arr[2][2][2]={1,2,3,4,5,6,7,8}: int *p,*q; q=(int*)arr; printf("%d",*q); my question is that how is it giving output as "1"(ofcourse, without quotes). what will change if i don't typecast arr in 3rd line of code? will anyone please explain.Is it giving o/p "1" ,just because of that typecast ? my thinking: as … ![]() |
I want to implement public key cryptography in my poject. How to implement using c langugae. Is there any library or api. Thanks for help | |
hello.... 1. how does one link a 2 radiobuttons in c# 2010 to the same column in ms sql 2005 2. what could be the problem when one tries to enter data from texboxes in c# 2010 to ms sql 2005 but its not reflecting? 3. what is the syntax … | |
#include <stdio.h> #include <stdlib.h> void main() { char a[50]; int n; printf("enter the string : "); gets(a); n=strlen(a); printf("%d",n); for(i=n;i>0;i--) { printf("%c",a[i]); } } the error is at i=n why cant we use i=n; | |
Hi geeks, I'm using visual studio to write and execute programs. I want to create breakpoint not like software breakpoints(F9 for debugging). I want to build the project in release mode and want to have breakpoint. I heard something like _asm int 3 to create breakpoint. Can anyone explain _asm … | |
The computer is a binary beast. We want to go from the one-fingered digital box to the ten-fingered human being and convert binary to denary(base 10) numbers. This is how it works, for instance, binary 10010 is calculated as 1*16+0*8+0*4+1*2+0*1 = decimal 18. Just because it's easy, let's throw in … | |
#include <stdio.h> #include <stdlib.h> void main() { char str[10],str1[10],str2[20]; int i,j,k; printf("enter string1: "); gets(str1); printf("enter the string 2: "); gets(str2); for(i=0,j=0;str1[i]!='\0';i++,j++) str[j]=str[i]; for(i=0,k=j;str2[i]!='\0';i++,k++) str[k]=str2[i]; printf("%s",str); } not producing correct output | |
#include <stdio.h> #include <stdlib.h> void main() { int a=5,b=10,*ptr,*pt1; ptr=&a; pt1=&b; b=*ptr; a=*pt1; printf("%d \n %d",a,b); } producing same values not swapped | |
![]() | hi.... int x=30, *y,*z; y=&x; assume x address is 500 and int is of 4 bytes z=y; *y++=*z++; x++; printf("%d %d %d",x,y,z); i want to ask that how the value of y is 504 here ? firstly value of z is assigned to value of y. then z is incremented … ![]() |
Hi! I'm constructing a code for parsing results in an html form and I'm having problems with strcat. It's really weird 'cause I'm positive the syntax and all that are all correct. I can't seem to find where the problem is. Basically, I have this non-empty string "copy" and when … | |
hi i want to convert the prefix form to postfix,prefix and infix form but when i input +5*62 it retuns only 2 what is wrong with my code can anybody help to solve this #include<stdio.h> #include<conio.h> #include<stdlib.h> #define Operator 1 #define notOperator 0 #define empty -1 struct node{ char item; … | |
Hi, I am new to programming and I am struggling with an sql select statement. I would really appreciate any help anyone can offer me! What I am trying to do is populate a textbox (using code and without creating a dataset) with data retrieved from an sql database. I … | |
hi! everyone. please could you give me some** great project ideas in C language**. Projects which deliver a practical solution to a problem . At the same time ,could you give some advice on how to start and end it perfectly. Thanks. | |
When i declare array in c before main method it gives, an error. Declaration is char a[65000]; main() {} and another declaration in other file char a[63000]; main() {} has no error what is the reason. | |
hi, I want to pass textbox text from one form to another using Property get and set. I have done it successfully on click event and then when popup window opens (or form2 opens) i get the value after initialization... But i want to learn how to do it with … | |
#include <stdio.h> #include <stdlib.h> #include<string.h> void main() { char name[30],mname[40]; printf("enter the num:"); gets(name); strcat(name,123); printf("%s",name); } is it possible to concatenate num and character its not working how to concatenate numbers and character | |
![]() | hi, int fun(int(*)()) { ....... ....... ...... } int main() { ....... ...... ....... fun(main); ........ ........ } my question is that how can we use "main" (only name without parenthesis) as the pointer to a function ? because main() is a function. I am not getting it how is … |
how to do the total of value in the array ben[20] have to use function or other ??????? #include<stdio.h> #include<stdlib.h> void main() { int ben[20]; printf("pls enter 20 no\n"); for (int i=0; i<20; i++) { scanf("%d",&ben[i]); } system("pause"); } | |
how can i put a c# windows form application on server? | |
This programs seems to run perfectly fine. but there is a bug in the get_number function I tried to find for hours but I couldnt. See if you guys can help me. Any help is greatly appreciated. Thanks **fconvert.h** // This is the header file for the functions used in … | |
#include <stdio.h> #include <stdlib.h> void main() { char a[30],b[30],i; printf("enter the a: "); gets(a); for(i=0;a[i]!='\0';i++) { b[i]=a[i]; } printf("%d",b); } it produces a wrong output | |
I have to wirte a code for monte carlo pi approximation for a menu driven calculator. here is my code but when i run it it shows me 1 instead of the pi value. can someone tel me what is wrong. double approximatepi(void) { double x,y,z,pi,randomnumber; double r,p,in; int tries; … | |
![]() | hi.. im new here, and this will be my very first post ever in this website.. i am using Dev C++.. so can you help me out a little here?? i have this code.. yes, some of these codes are found all over the internet.. but most of the code … |
how do i implement a c program that removes all nonalphabets in the given string?? | |
Hey people I wrote a program and installed it on another computer. Every time I get this error that says "The Microsoft ACE OLEDB 12.0 provider is not registered on the local machine". Please can anyone assist. Thanks | |
Ok, I'm really having a hard time with this, but I don't even know what I'm missing. I t should be easy. Here's the problem: You have a linear equation system: a1x+a2y=a3 // a4x + a5y=a6. Ask for a1, a2, a3, a4, a5 and a6 as input, solve x and … ![]() | |
generally we can build a application in java and vb make it as a exe.but how do we build application using c or c++.even some operating systems like xp was written in c++.how is it possible????/ | |
Hello, can anyone suggest me how to execute graphics programs(such as DDA line algo) using GCC compiler under windows? graphics.h is a part of turbo c and is not available in gcc.. so is there any way to do this?? | |
char a[5000]; main() {} and in another file main() { char a[5000]; } after compiling both file. exe of both file size have large difference. why | |
I have To build the web browser in C#.net. in that web browser,if i load any URL that browser should export the name and all values of dropdown controls which present in that particular web page which i load.pl help me to build this web browser. | |
#include <iostream> #include<string> using namespace std; int main() { string admin_pwd="testing"; string encrypted ; string unencrypted; char key[5] = "abcd"; for (int x=0; x < admin_pwd.size(); x++){ encrypted += admin_pwd[x] ^ key[x/100%30]; } cout << "Encrypted = " << encrypted<<endl; for (int x = 0; x < admin_pwd.size(); x++){ unencrypted … | |
Hi, I have taken checkboxes in datagridview....i want to insert the values of field checked into the databse......anybody can help?????????? |
The End.