how can i get the output
54321
4321
321
21
1

in c programming........???? pls help......

Answer Posted / dattatreya

#include<stdio.h>
int main(){
char a[6]="54321";
char *p=a;
while(*p){
printf("%s ",p++);
}
return 0;
}

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the best style for code layout in c?

633


How can I write a function that takes a format string and a variable number of arguments?

606


What is the role of && operator in a program code?

569


stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.

1857


List the difference between a 'copy constructor' and a 'assignment operator' in C?

639






If I have a char * variable pointing to the name of a function ..

655


What are the different properties of variable number of arguments?

669


How can I read in an object file and jump to locations in it?

582


How do we declare variables in c?

572


What language is c written?

578


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

626


How can variables be characterized?

1653


How would you rename a function in C?

623


Is a pointer a kind of array?

602


What are the ways to a null pointer can use in c programming language?

592