15,552 Topics
| |
/*Hi, I was trying to optimize my application in C. In that process to reduce the complexity at condition checks which of the below is efficient,*/ if(bFlag1 && !(Var == 1) && bFlag2) //or if(bFlag1 & !(Var == 1) & bFlag2) | |
So I was writing a program that would take a string from clipboard, do some stuff and put the new string back to clipboard. My code so far is posted below. The problem is I want my program to wait for me until I 'ctrl+C' something. I know that `GetClipboardData()` … | |
#include<conio.h> #include<stdio.h> #include<stdlib.h> #include<math.h> int k,i=0,m=0,flag=0; int coef[10]={0}; float x1=0,x2=0,t=0; float fx1=0,fdx1=0; what is the benefits if the variables are defined outside of the function ,just after #include thanks!! | |
for the codes under for loop this error massage is showing 19:37 C:\Users\azr\Desktop\Untitled1.c invalid suffix "xy" on integer constant #include<stdio.h> #include<conio.h> #define func(x,y) 3xy int main() { int x0,y0,n,y1,k1,k2,k3,k4,h; printf("enter the values"); printf("enter x0:"); scanf("enter x0:%d",&x0); printf("enter number of x values:"); scanf("no. of x values:%d",&n); printf("value of hight h"); scanf("value … | |
can any1 explain me how the values r being stored and how union and intersection is takin place please explain me in detail what is happening in program d program is on union and interscetion of graphs pls help me out i m unable 2 understand d program #include<stdio.h> #include<conio.h> … | |
i have a problem with how to use c programming keywords while doing programming can you post me some solutions with these keywords as with their uses and meanings. | |
For “YEAR” field, create a function to calculate the value (hint : use %)based on following categories: Year 1 : Sem 1 – Sem 3 Year 2 : Sem 4 – Sem 6 Year 3 : Sem 7 – Sem 9 so, we must convert from given semester number to … | |
Here's the question. http://postimg.org/image/nmqrupznp/ And here's my program, #include <stdio.h> #include <string.h> void encrypt (char *text,char *map); void decrypt (char *text,char *map); int main() { int a,b; char c[]="abcdefghijklmnopqrstuvwxyz"; char d[]="thequickbrownfxjmpsvlazydg"; char *text; char *map; text=&c[0]; map=&d[0]; printf ("Encrypt press 1;Decrypt press 0.\n"); scanf ("%d",&b); if (b!=0&&b!=1) printf ("please enter … | |
can any1 tell me the logic of writing prog for union,intersection and ring sum of a graph and also pls tell me the symbols dat are used in progs | |
Some good online tuts for Data Structures and Algorithms in C ?? | |
can any one help me on this .what does this two for loop means 1.for(; x<9; x++) 2. for(;;) | |
Hello, I'm wondering if I can get help to understand the behaviour of a PHP function: `dns_get_record()`. This returns an array with DNS records for the given domain name, here is an example of the output: php > print_r(dns_get_record('php.net', DNS_TXT)); Array ( [0] => Array ( [host] => php.net [type] … | |
how can i keep track of new users to my website. for ex: X is visiting my web-site regularly, so for per week count, i have to count him only once and if Y has visited as new user, then up the count by one. so how can i keep … | |
actually what i want to do is to take birthday as input from the user,taking 3 variables for date,month and year.what the probelm raised here is i what - or / to come automatically after the user has given his date and similarly between month and year without his special … | |
Write a program that converts numbers to words. For example, 895 results in "eight nine five." here are my codes: #include<stdio.h> #include<stdlib.h> int main() { printf(">>This program converts numbers to words :)\n"); int value; printf("Enter value: "); scanf("%d",&value); switch(value){ case 0: { printf("zero"); break;} case 1: { printf("one"); break;} case … | |
edges.txt is used.it is the input adjacency list. 1 3 1 5 2 3 2 6 4 5 5 6 #include<stdio.h> #include<stdlib.h> #include<conio.h> int **adjL; int v,*arr; void dfs(int **adjL) { int j,i=0,temp,dfslabel=1,s=0,k=0,top=0; int stack[v]; int *flag; flag=(int*)calloc(v+1,sizeof(int)); for(i=0;i<=v;i++) flag[i]=0; stack[++top]=1; flag[1]=3; stack[top]=1; while(1) { if(i==arr[stack[top]-1]) { printf("examination of %d … | |
I do c language "httpd" application works without problems at first. 1. meet user requests from nginx ago 2. Looking to requests from. Directs incoming requests according to the address 127.0.0.1:8080 But how can I solve the query is loaded when the crash occurred. #include <stdio.h> #include <stdlib.h> #include <string.h> … | |
Hello, I have been researching the minimax algorithm for a few days, but I can't apply it properly. I have read that for the 8 lines in Tic Tac Toe, you give certain scores. However, I don't understand what they are trying to tell me. Could I have a simple … | |
probably doing something fundamentally wrong , but im used to the luxury of java's `System.currentTimeMillis()` or `System.nanoTime()` unfortunately. i have a code that i posted before for a different problem (couldnt compile properly in pelles C) , but now , although its compiling well and good , my clock outputs … | |
| Here is what i coded for a simple binary to octal converion. If no of digits in binary are multiple of 3 then it works fine but get crashed otherwise . . . . am not able to figure our how to pad up for the grouping of 3 when … |
Hi! what is wrong with the following function? void foo(*ptr){ char buff[127]; ctrcpy(*ptr,buff); } I know that it doesn't really do something... it's for information purpose only.... Thanx!! | |
I posted a question about algorithms for Tic Tac Toe's invincible AI (that never loses, only wins or ties), and found a scoring method. Here is the code I came up with. As of this moment it takes the next available space, so the scoring appears not to be working. … | |
The simplest way is now friends with this command when running this sample compiled #include <stdio.h> #include "fcgi_stdio.h" int main(int argc, char *argv[]) { while(FCGI_Accept() >= 0) { printf("Content-Type: text/html; charset=UTF-8"); printf("<center><br><br>Hello World Wide Web</center>"); } return 0; } **operation type:** cgi-fcgi -start -connect localhost:9000 ./hello After you run this … | |
[B]This will works Recusivly and easily[/B] | |
#include<stdio.h> #include<conio.h> #include<string.h> struct student { int*ptr[23]; char*name[12];//store address of character string }s1; void main() { int roll=20; //char n='s'; s1.ptr=&roll;//ERROR s1.name="zahid ali";//ERROR printf("roll no of student :%d\n",*s1.ptr); printf("name of student:%s\n",s1.name); getch(); }//plase coorect this error | |
Write a program that displays the outline of a box five characters wide and five characters tall. Use the ‘*’ character for the box outline. here are my codes: #include <stdio.h> #include <stdlib.h> int main() { printf("%c\v", '*'); printf("%c\v", '*'); printf("%c\v", '*'); printf("%c\v", '*'); printf("%c\n", '*'); printf("%c%8c\n", '*','*'); printf("%c%8c\n", '*','*'); … | |
Hi, i have a problem here i am trying to write to a file through fwrite and read through fread functions. it asks me to enter 5 values with no problem but when i trying to read from a file it prints 6 values, the 5th values prints twice what's … | |
Write a program to calculate the estimated journey time of a train. The program should request and read the distance in miles and the average speed in miles per hour, and display the estimated journey time in hours and minutes to the nearest minute. Test your program with: a) Distance … | |
Hello all, I am new to Glut, and I have made a program in C to draw lines and triangle using bresenham algorithm. But, when i run the code, the display function is called 3 times automatically. I want it to run only once. If I give input for one … | |
As i work through my code, i notice a little error message as i try to compile/build my code. It says that the PDB File is missing. Can someone explain to me what is a PDB file and how do i make it "visible" in order to keep the error … |
The End.