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 |
void main() { int const * p=5; printf("%d",++(*p)); }
3 Answers Infosys, Made Easy, State Bank Of India SBI,
how to concatenate the two strings
main() { char not; not=!2; printf("%d",not); }
¦void main() ¦{ ¦int i=10,j; ¦ j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-30 but in same question if we write as- ¦void main() ¦{ ¦int i=10; ¦ int j=i+++i+++i; ¦printf("%d",j); ¦getch(); ¦} ¦ output:-33 why output is changed from 30 to 33. Can any body answer...
main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(ā%u %u %u %d \nā,a,*a,**a,***a); printf(ā%u %u %u %d \nā,a+1,*a+1,**a+1,***a+1); }
main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; printf("%c%v",c,v); }
To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates.
19 Answers Amazon, BITS, Microsoft, Syncfusion, Synergy, Vector,
#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?
plz send me all data structure related programs
Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.
source code for delete data in array for c
main() { int i=10; i=!i>14; Printf ("i=%d",i); }