ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
Print the foll in C...eg when n=5 the o/p must b
+       +
+ +   + +
+ + + + +
+ +   + +
+       +
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +
Answer
# 1
char *m[] = { "+   +", "++ ++", "+++++" };
	for (i=1; i <= 5; i++)
		printf("%s\n", m[5%i]);
 
Is This Answer Correct ?    0 Yes 3 No
Ataraxic
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
What is the Difference between Macro and ordinary definition? Motorola2
what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green") Cadence4
how to sort two array of characters and make a new array of characters. Accenture1
what is the benefit of c30  1
write a function which accept two numbers from main() and interchange them using pointers?  3
regarding the scope of the varibles;identify the incorrect statement: a.automatic variables are automatically initialised to 0 b.static variables are are automatically initialised to 0 c.the address of a register variable is not accessiable d.static variables cannot be initialised with any expression TCS1
How to avoid structure padding in C? Tech-Mahindra4
how to make c program without a libary? e.g.#include<stdio.h> libary is not in c progaram.  1
What is sparse file?  1
int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15 Wipro8
what are the static variables HCL7
What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int); Bosch3
what is the differance between pass by reference and pass by value. Infosys4
Describe advantages and disadvantages of the various stock sorting algorithms Microsoft1
write a string copy function routine?  1
Write a program to generate prime factors of a given integer?  1
what is the use of #pragma pack, wer it is used? Wipro1
What should be keep precautions while using the recursion method?  1
1. Write the function int countchtr(char string[ ], int ch); which returns the number of times the character ch appears in the string. Example, the call countchtr(“She lives in NEWYORK”, ‘e’) would return 3.  2
plz answer..... a program that reads non-negative integer and computes and prints its factorial  2
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com