Geeks Talk

Prepare for your Next Interview




Source as output

This is a discussion on Source as output within the C and C++ forums, part of the Software Development category; Hai friends.... Without using files the program output is Its source code (coding is output)?...


Go Back   Geeks Talk > Software Development > C and C++

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-03-2008
Junior Member
 
Join Date: Aug 2008
Location: Coimbatore
Posts: 8
Thanks: 2
Thanked 2 Times in 2 Posts
ks.dinesh is on a distinguished road
Source as output

Hai friends....

Without using files the program output is Its source code(coding is output)?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-03-2008
Expert Member
 
Join Date: Apr 2008
Location: tamilnadu
Posts: 746
Thanks: 15
Thanked 73 Times in 70 Posts
deepasree will become famous soon enough
Re: Source as output

hi dinesh

Try this code

#include"stdio.h"
void main()
{
FILE *p;
char ch;
clrscr();
p=fopen("raja.c","r");
while((ch=getc(p))!=-1)
putchar(ch);
fclose(p);
getch();
}

Thanks
Deepasree
Reply With Quote
  #3 (permalink)  
Old 10-06-2008
Junior Member
 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
bandlaraj is on a distinguished road
Wink Re: Source as output

how abt this?

char *s="char*s=%c%s%c; int main() {printf(s,34,s,34);}"; int main() {printf(s,34,s,34);}

thanks
Reply With Quote
  #4 (permalink)  
Old 10-07-2008
Expert Member
 
Join Date: Apr 2008
Location: tamilnadu
Posts: 746
Thanks: 15
Thanked 73 Times in 70 Posts
deepasree will become famous soon enough
Re: Source as output

hi dinesh,

Try this code too

main()
{
char*a="main()
{
char*a=%c%s%c;
int b='%c';
printf(a,b,a,b,b);
}";
int b='"';
printf(a,b,a,b,b);
}

Thanks
Deepasree
Reply With Quote
Reply

  Geeks Talk > Software Development > C and C++


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
source qualifier prasannavld Data Warehousing 3 09-06-2008 06:54 AM
DML for excel csv source anil.kv Data Warehousing 1 06-24-2008 03:51 AM
Source Qualifier rajesh.peri Data Warehousing 1 02-07-2008 03:29 AM
First output value is getting overwritten by second output Geek_Guest QTP 2 01-05-2008 04:40 AM
Source of Job christia Interviews 2 08-09-2006 07:57 AM


All times are GMT -4. The time now is 01:43 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved