SCHOOL OF CODE BUILDERS
Learn To CODE. Become A DEVELOPER.
Pages
HOME
DATA STRUCTURES
STRINGS
ARRAYS
MATRIX
BINARY TREES
LINKED LIST
STACK
QUEUE
SORTING
SEARCHING
C
PYTHON
PSEUDOCODE
CONTEST PROBLEMS
ALGORITHMS
PATTERNS
PHP
C PUZZLES
C INTERVIEW QUESTIONS
JAVA
C++
HASHING
RECURSION
BASIC C PROGRAMS
TCS-CODEVITA
FACEBOOK
CONTACT US
C program to print x pattern
C program to print x pattern
Output:
CodeRegister
C r o e d t e s R i eg eg R i e s d t o e
C r
Implementation:
#include
#include
#include
int main(void) { /* Pointer to a character */ char *v; int N,i,j; /* allocate memory block of 256 characters & store the initial address of the block in character pointer 'v' */ v=(char*)malloc(sizeof(char)*256); /* get the input string from the user */ scanf("%s",v); /* calculate the length of the string using strlen() library function */ N=strlen(v); for(i=0;i
PREVIOUS
NEXT
HOME