69 Posted Topics
Re: You want single instruction ??? I dont think thr are any such instructions which can calculate number of occurances.. But you want a program to calculate it [URL="http://www.daniweb.com/code/snippet329277.html"]Count alphabets[/URL] | |
Re: Post what all you have .. How you going to calc grade using percentage thn anyone 'll help you | |
Re: You can use a simple switch .. May be like this.. [CODE]#include <stdio.h> int main(void){ while(1){ int opc; printf("What u want to do?\n"); printf("1. smthing\n"); printf("2. smthing\n"); printf("Your Choice: "); scanf("%d",&opc); switch(opc) { case 1 : FirstFunction(); break; case 2 : SecondFunction(); break; .. .. .. default: printf("Wrong Choice\n"); break; … | |
Re: u not defined both variables .. and on 169th line u allocating memory but u not holding its address .. I think correct line there may be [CODE]guessWord = (char *) malloc ((sizeof(char)*2000)+1);[/CODE] sry if its wrong not read your full program .. | |
Re: Reading others code code is a good way to learn but if you code by yourself you 'll get to learn lots of things .. I coded a similar program .. Al you need is ... [CODE] // Big while loop int direction; while(1) { if(khbit()) { //program which returns … | |
Re: Is it a C program ?????????????????????? Post in Java discussion thread .. | |
Re: OMG!! what actually you are trying to do??? | |
Re: U can add current directory to $PATH PATH=$PATH:. | |
Re: I dont have clear idea but write() function, may be it writes in binary mode so may be thats why text editors complaining .. | |
Re: Is this you talking about?? [CODE] while( (ch=getchar())!="\n" && i < MAX_SIZE) { input[i] = ch; i++; } input[i] = "\0"; [/CODE] | |
Re: All of us understands C language more easily .. Post part of code u coded so that everyone can get a clear idea what help you want.. | |
Re: Whats your error??? Answer not correct? Use a larger data type .. instead of [CODE]int num=1;[/CODE] try [CODE]long num=1;[/CODE] or [CODE]long long num=1;[/CODE] | |
Re: Scan String thn use a function like [CODE]int isNum(char c) { if ( c < '0' || c > '9' ) return -1; return c - '0'; }[/CODE] Function works for single char .. you may try for string .. or else u can use same function for every char … | |
Re: [CODE]#include "stdio.h" main() { FILE *fsource, *fd; char ch; fsource = fopen("file_name", "r" ) ; if ( fsource == NULL ) { puts( "Cannot open source file" ) ; exit(0); } fd = fopen ( "Destination", "w" ) ; if( fd == NULL ) { puts ( "Cannot open target … | |
Re: Oopppssss .. See in ur [CODE] for(i; i<(i+p); i++) { printf("Enter %d number:",i); scanf("%d", &(*(a+i))); }[/CODE] i <(i+p) when i increaments it increaments on either side.. Condition cant fail unless p=-i .. Soluction is simple use another variable to store count of elements [CODE] int temp = i; for(i; i<(temp+p); … | |
Re: Program works fine with scanf also but fflush(stdin) at 19 n 22 are must .. | |
Re: It may help u ... Donwload with source code .. http://shashankkulkarni.co.cc/progs/addressBook.html | |
Re: I dont think thr are any special functions to do tht but u can use older Borland C to change text size color them etc .. Check graphics.h header .. | |
Re: Check this .. http://www.junix.in/progs/java/Snake_Game_Java.php ![]() |
The End.