15,552 Topics

Member Avatar for
Member Avatar for Iamateur

Accept the string from the user. Find the date from the given string with ddmmyyyy format and display the output as:"date found = " Eg:input:Eg: abc0712201345bye output:date found =07122013 how to do this?

Member Avatar for Adak
0
216
Member Avatar for shashikumar s g

/* EXCHANGE THE INTEGER VALUE WITHOUT USING THE THIRD VARIABLE */ #include<stdio.h> void main() { int a,b; printf("enter the two integer variabe \n"); scanf("%d,%d",&a,&b); //exchange the value of a to b ,b to a without using third variable a=a+b; b=a-b; a=a-b; printf("%d%d",a,b); getch(); } /*EXAMPLE: A=3,B=10 A=A+B; // A=3+10=13 B=A-B; …

Member Avatar for shashikumar s g
0
339
Member Avatar for prakash4

1. #include<stdio.h> #include<conio.h> int main() int a=10; printf("%d%d%d",a,a++,++a); getch(); return 0; } o/p:12 11 11 #include<stdio.h> #include<conio.h> int main() { double a=5.2; if(a==5.2) printf("equal"); else if(a<5.2) printf("less"); else printf("high"); getch(); } o/p: less Can any one give me explanation for the above outputs.....

Member Avatar for sepp2k
0
284
Member Avatar for HackerSameer

while compiling "hellow, world" program in C (using turto c++) it shows error as -cannot open include file '<studio.h>' -function printf should have prototype i have written the code as #include <stdio.h> main() printf("Hellow, world\n"); return 0; } please help me

Member Avatar for Adak
0
122
Member Avatar for kandarpa

Hi all I have a function and it is being called by many other functions. Is there any method or macro which can return the function name which calls the current function. EX: [code] int a() { pintf (<required a macro for printing the caller function name>); /* do operation …

Member Avatar for बालाजी
0
7K
Member Avatar for J_SON

Hi , I am trying to do a couple of bitwise operations on some hex numbers but for some reason i cant compile. Apparently, it wont be possible with my method: #include <stdio.h> float tv,lv; float nv = 0x01FE; int main() { tv = 0x7FFC; lv = 0x8000 & tv; …

Member Avatar for J_SON
0
265
Member Avatar for Prithwish

Hi, Thanks to everyone who would be reading this post. I would like to know how to write programs in C to control Hardware for modems, printers and how to get the basic concepts for writing device drivers. thanks once again !! Prithwish

Member Avatar for rubberman
0
314
Member Avatar for Vish0203

I was trying to solve the Euler problem number 50, and wrote the following code and got the answer as, no. of primes = 536 and prime value is 958577 But, when i search the answer for this on internet, it says 543 primes and prime is 997651 why does …

Member Avatar for Adak
0
588
Member Avatar for Qwert_1

I have been trying to print all the combination of a string using recursive call. I have studied a code given below . It prints the combination but now i have to store the strings in an array . And i don't get it how do i do that ? …

Member Avatar for Adak
0
228
Member Avatar for dendenny01

Whenever I try to run this code in turbo c++ 4.5 I recieve an error "General Protection Exception List.c 60 List(2) 0x24DF:0x0157 processor Fault" whereas when the same Program is run in Turbo c++ 3 Dos version It Compiles and Runs Propely without any error. Please Help. #include <stdio.h> #include …

Member Avatar for Ancient Dragon
0
919
Member Avatar for MadnessCow

Hi guys. I'm pretty new to C program. I've been given this assignment to write a program that asks the user thow many terms of the serires equation to use in approximating PI. The formula given is pi=4X(1- 1/3 + 1/5 - 1/7 + 1/9 - 1/11 + 1/13 - …

Member Avatar for Adak
0
6K
Member Avatar for killer88
Member Avatar for killer88
0
208
Member Avatar for srivardhanms

Hi, Can anyone give me an efficient algorithm for adding an element into a sorted matrix of linked list such that the size of the columns remains constant. Thank-you, Sri

Member Avatar for srivardhanms
0
478
Member Avatar for Adak

Demonstrates the Right Hand Rule maze solving algorithm, with some sweet console colors and text display and erasing, in Windows. Note that if the Start is moved away from all the walls in the maze, the right hand rule fails, circling endlessly. Also, a similar failure happens if the Start …

0
3K
Member Avatar for SoreComet

Hey Guys, I need your expertise. Please help me. In the following program, 2 matrices and given values and then displayed. The program works fine but I really can't understand how it works. #include <stdio.h> #include <stdlib.h> void getmat(int a[50][50],int n) { int i,j; for(i=0;i<n;i++) for(j=0;j<n;j++) scanf("%d",&a[i][j]); } void printmat(int …

Member Avatar for deceptikon
0
165
Member Avatar for roeljaime

Write a program that will asks the user for a positive integer input. Print the even numbers between 1 and the inputted number on the screen. 2.2. Write a program that will compute the sum of the first N odd numbers. Example: If the value of N is 5, then …

Member Avatar for rishif2
0
97
Member Avatar for Muhammad Waqar_1

hi every one! i have a question, how to pass arguments from other functions to main. i want to write a program like nano well not exactly like nano editor. I have a function f_read(char* filename[]), and fopen() get filename[1] as file name and *filename[2] as "r" read mode and …

Member Avatar for Ancient Dragon
0
288
Member Avatar for pedrololarol

Hey everyone. I'm trying to use the g2 library in CodeBlocks but I can't seem to get it properly installed. Can somebody please explain me what to do, step by step? Best regards

Member Avatar for gusano79
0
567
Member Avatar for infatuate

So I just found out what Rot13 is and what its suppose to do but I now I have to implement a code that will allow me to execute Rot13. Does anyone have any tips on where I should start? (besides the beginning -__-). Any help is appreciated! thank you!

Member Avatar for L7Sqr
0
142
Member Avatar for altic

Hey there, please help me how to solve this problem. I need to find my CPU temperature in C code on Linux for my new program. Can anyone tell me???

Member Avatar for nash_1
0
11K
Member Avatar for poloblue

For the MIPS assembly instructions below, what are the corresponding C statements. a) addi f, f, 4 b) add f, g, h sub f, i, f So far, I have this but I don't if it is correct. a) f = (f + 4); b) f = g + h …

Member Avatar for DeanMSands3
0
51
Member Avatar for blob84

Hello i implemented this FIFO queue: #include <stdio.h> void enqueue(int *, int); int dequeue(int *); int qempty(void); int head = 0; int tail = 0; int qerror(void); #define N 4 int main(void) { int i = 0; int v[N]; while (i < 10) { enqueue(v, i); i++; } while (!qempty()) …

Member Avatar for Nutster
0
11K
Member Avatar for totalwar235

I am attempting to recompile a C program i programmed on linux. These are the errors i recieve: c:\users\dsu\dropbox\codes\c\gamereedtucker\main.c(28): error C2275: 'FILE' : illegal use of this type as an expression c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(66) : see declaration of 'FILE' c:\users\dsu\dropbox\codes\c\gamereedtucker\main.c(28): error C2065: 'sy' : undeclared identifier c:\users\dsu\dropbox\codes\c\gamereedtucker\main.c(29): error …

Member Avatar for totalwar235
0
475
Member Avatar for rabbit337

My task is to create a complete binary tree. The only requirements are that it be a dynamic tree with nodes and pointers - I may use temporary arrays to help with the intial tree construction. Where I need help is with the insert(Node) method. Here's what I have so …

Member Avatar for sonu_1
0
1K
Member Avatar for Thundermax

Hello guys, I need to make a program that counts the number of times a particular word appears in a text file on a line. For example, the User chooses the word "test" to be told at the end of each line of txt should show how many times that …

Member Avatar for Adak
0
151
Member Avatar for friendly1

http://www.getfriendlynotes.com/index.php?q=topic_disp&subsno=3&prog=431251#tpc1

Member Avatar for best4earn
0
90
Member Avatar for Rachana_1
Member Avatar for lohith44
-2
705
Member Avatar for parth2911

optput its not proper i am tring to print 1 to n given number prime number plese solved error.....

Member Avatar for nitin1
0
303
Member Avatar for Zsmash

#include <windows.h> #include <stdio.h> #include <conio.h> void gotoxy(int x,int y); int main(int argc, char *argv[]) { char urname[1],surname[1],fullname[1]; start: system("COLOR 1c"); gotoxy(11,9); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); printf(" "); gotoxy(11,10); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); printf(" "); gotoxy(11,11); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); printf(" "); gotoxy(11,12); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); printf(" "); gotoxy(11,13); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); printf(" "); gotoxy(11,14); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); printf(" "); gotoxy(11,15); SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),291); printf(" "); gotoxy(14,10); …

Member Avatar for Ancient Dragon
0
352
Member Avatar for Falcon143

/* Hi, In my process of C code optimization*/ Clip(int Val) { return (curr < 0 ? : ((curr > 255) ? 255 : curr)); } /* I want the int value to be clipped between 0 to 255. Is there any other way to optimize above code snippet? */

Member Avatar for Banfa
0
2K

The End.