| |
GeekInterview.com > Tech FAQs > Programming > C
| Print | |
Question: Q1. write a program to find a given number is armstrong number or not ?
Q2write a program which accepts a filename as a command line argument and reverse the contents of the file(i.e first character becomes the last character of the file and so on ?
Q3 how can i call a function given its name as a string ?
Q4 How to swap low-order byte and high order byte in an integer without using temporary variable?
Q5 If we develop a project in C, then how can we create an .exe file of it?
Q6 how to print 1 to 100 numbers without using any condition checkings ?
Answer: please let me know the answers to my email address as i having the interview in TCS so please please please please let me know
|
| January 01, 2007 04:23:14 |
#3 |
| mekala |
Member Since: Visitor Total Comments: N/A |
RE: Q1. write a program to find a given number is arms... |
#include<stdio.h> int main() { int i,j,k,l,m; printf("give the number to find Amswrong (three digit)"); scanf("%d",&i); j=i/100; k=i%100; l=k/10; m=k%10; j=j*j*j; l=l*l*l; m=m*m*m; if(i==j+l+m) { printf("yes %d is an Amswrong numbern",i); } else printf("not an Amswrong number"); }
|
| |
Back To Question | |