C statement to copy a string without using loop and library
function..
Answers were Sorted based on User's Feedback
Answer / abhishek soni
main(){
char ch[10]="Welcome";
char copy[10];
int i=0;
clrscr();
copyStr:
copy[i] = ch[i++];
if(ch[i] != '\0')
goto copyStr;
printf("%s",copy);
getch();
}
Is This Answer Correct ? | 72 Yes | 8 No |
Answer / goresh
main()
{
char str1[]="My name is Goresh...";
char *p;
p=str1;
printf("%s",p);
}
Is This Answer Correct ? | 28 Yes | 13 No |
main() { int c=- -2; printf("c=%d",c); }
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
main() { int i=400,j=300; printf("%d..%d"); }
You are given any character string. Find the number of sets of vowels that come in the order of aeiou in the given string. For eg., let the given string be DIPLOMATIC. The answer returned must be "The number of sets is 2" and "The sets are "IO and AI". Vowels that form a singleton set must be neglected. Try to post the program executable in gcc or g++ or in java.
main() { int i=10; void pascal f(int,int,int); f(i++,i++,i++); printf(" %d",i); } void pascal f(integer :i,integer:j,integer :k) { write(i,j,k); }
char inputString[100] = {0}; To get string input from the keyboard which one of the following is better? 1) gets(inputString) 2) fgets(inputString, sizeof(inputString), fp)
code of a program in c language that ask a number and print its decremented and incremented number.. sample output: input number : 3 321123
void main () { int x = 10; printf ("x = %d, y = %d", x,--x++); } a. 10, 10 b. 10, 9 c. 10, 11 d. none of the above
write a c program to Reverse a given string using string function and also without string function
Design an implement of the inputs functions for event mode
What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql
main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above