15,551 Topics
| |
Hi All, I am trying to send data from client to server. And getting data back to client. But I am facing following issue. 1. I am unable to display client message in server side. 2. I am unable to get back message from server. Also I am not getting … | |
main() { char str[30]; int i ,n=0; printf("enter stirng"); while(( str[n]= getche() ) !='\r') n++; str[n]='\0'; for(i=0;i<n;i++) putchar(str[i]); } this is a simple program. enter string as input and same string become output. nothing is wrong in this program. this program is in my book. my question is what is … | |
Hi, I want to install turbo c in windows. I don't have cd to install turbo c. I tried downloading a zip package and installing but it is giving error. How can i install and download turbo c in windows? Any suggestions? VANDITHA | |
when m pressing printf("welcome to airline reservation system\n"); its gettng error tt its a declaration syntax error plx help me i have to complete my project | |
while storing the value 1.111 in a float variable the value stored and printed is 1.1109999. why is this loss of data or sometimes the gain of data?. | |
#include<stdio.h> int main(int argc, char *argv[]) { char *states[] = { "California", "Oregon", "Washington", "Texas" }; printf("size of states: %d",sizeof(states)); return 0; } the result of this is: size of states: 16 why is that?I know that an int is 4 bytes,while a char is 1 byte.I got confused why … | |
I've been dealing with this problem for about 2 days now. Write a program that accepts the price of an item and displays the discounted price. Accept also the amount given by the customer (assume the amount is greater than or equal to the discounted price) and display the change. … | |
Read the age and weight of 5 people. Calculate the sum of the ages of people over 70 Kg #include <stdio.h> int i, age, weight, sum; main() { for( i=0; i<5; i++) { printf("Age: "); scanf("%d",&age); printf("weight (ex: 92.5): "); scanf("%d",&weight); if(weight>70) sum=sum+age; } printf("\age sum: %d", sum); return(0); } | |
how to insert photos in c programming? | |
How do i make a validating of only number and make characters invalid if entered. Using this method #include<stdio.h> #include<string.h> #include<conio.h> #include<math.h> #include<stdlib.h> #include<ctype.h> int main() { int arr [100],el,number ; // for(int i=0;i<100;++i) //scanf("%d",arr[i]); while( el == 0 ) { printf("Enter a number between 1 to 100"); scanf("%d", &number … | |
Say I have this definition: #define SIZE 2000 typedef enum { TRUE, FALSE }Boolean; typedef struct{ char jobTitle[30]; char jobDesc[255]; char jobLoc[255]; float salaryMin; float salaryMax; Boolean isAvailable; }jobInfo; typedef struct cursorNode{ jobInfo jobRec; int next; }HeapSpace[SIZE]; typedef struct hnode{ HeapSpace heap; int Avail; }*VHeap; typedef int List; typedef struct{ … | |
I have a problem. I have a function that search a string in a text file. This function return an int: 0 if the string I must be search isn't in the file, 1 otherwise. The problem is: if the searching string is "input1" and in the file there is … | |
Write a code snippet to declare and accept an integer and calculate the cube value of the integer. The integer should be passed by reference to a function cube(). The function would calculate the result of cubing the integer. The function prototype to be used is: void cube (int *p); … | |
**Program:** #include <stdio.h> int main(){ int array[5] = { 0,1,2,3,4} ; int * p1, **p2 ; int * parray[2] = { NULL , NULL }; p1= & array[2] ; *p1 = 20 ; p2 = & p1 ; ** p2 = 30 ; parray[0] = & array[0]; parray[1] = & … | |
Hello guys, okay? I have a problem and I wonder if anyone can help me. Well, as the title of the topic says, the problem is about the C language, and more specifically on GUI. I made a C program it is working and everything is ok. But the problem … | |
In Turbo C , I am using bios.h to send and receive data on serial Port. I am using bios(2, 0, COM1) to receive data.... and bios(1, in, COM1) to send data..where (let int in=65 I am receiveing data from Port but unable to send... I copied code from [url]http://electrosofts.com/serial/[/url] … | |
Is C really a good language do have under your belt? Would it be better just to learn C++? | |
Is C a good language for webapps compared to python and ruby? | |
[Click Here](http://www.geekboots.com/c/intro) get lot of simple c programming which will help you to learn C programming at the beginner stage. | |
Here's the problem: Write a program that will input values for A and B. Compare two values inputted and print which of the values is higher including the remark “Higher”. So here's what i've done so far main() { int A, B; clrscr(); printf("Input Value for A: "); scanf("&d", &A); … | |
I am using C/C++. I am using geany for editing my codes. I want to use beecrypt in my programs. But ofcourse, it is not included by defualt. I have downloaded beecrypt library already but don't know how to use it with my programs. I have put my program in … | |
Main.cpp #include <iostream.h> #include "functions.h" int main(){ print_hello(); cout << endl; cout << "The factorial of 5 is " << factorial(5) << endl; return 0; } hello.cpp #include <iostream.h> #include "functions.h" void print_hello(){ cout << "Hello World!"; } factorial.cpp #include "functions.h" int factorial(int n){ if(n!=1){ return(n * factorial(n-1)); } else … | |
Hi! I'm a student learning C language. During my exercise I have faced a weird problem(atleast to me). I have encountered two declarations: int size; int arr[size]; I'm unable to figure out the actual dimension of the array and its lenght as the variable `size` is only declared not defined; … | |
Often times it is useful to instrument a program you do not have the source to in an attempt to learn more about it. This can be for debugging purposes, blackbox testing, or for providing alternate versions of common functions/libraries (to name a few). On Linux, there is a very … | |
I want to build an own interpreter using c programming and I want to call it in command prompt. How would i do this? I just want to start a command "display" which can display the contents of a file like type in cmd. | |
Hi, What is the difference between "__inline__" and "inline"? I have programs with both. "inline" works, "__inline__" has an error "Unable to resolve identifier __inline__" thanks | |
I'm trying to search a text file for a string indicating the path of a folder which I will then use as a path to write a text file into. My code above successfully returns the location of the path /home/caars/speech_reg/commands/ to the pointer to find. Now I am trying … | |
I want to Delete every occurrences of Pattern in String. But What's the problem? Please help with the following C Code. #include<stdio.h> #include<string.h> #include<stdlib.h> char* SUBSTRING(char *STRING,int POSITION,int LENGTH); main() { char STRING[100],PATTERN[90]; int X,P; printf("(Input)Enter string & pattern with space between them: "); scanf("%s%s",STRING,PATTERN); X=INDEX(STRING,PATTERN); P=strlen(PATTERN); printf("Output: %d\n",X); while(X!=0) … | |
I am trying to make a function that rounds number.. I declared the function above the main and voided it Then I recalled the function in the program and listed the variables needed in brackets and then I wrote the function I can't work out what is wrong. [ICODE]#include<stdio.h> #include<math.h> … | |
I am confused about pointer , it takes value of a vairable or only takes adress of vairable ?? |
The End.