C General - String Concatenation
Interview Question Database For Software Developers
|
|
| String Concatenation | What will be printed as the result of the operation
below:
main() {
char *p1;
char *p2;
p1=(char *)malloc(25);
p2=(char *)malloc(25);
strcpy(p1,"Cisco");
strcpy(p2,"systems");
strcat(p1,p2);
printf("%s",p1);
}
| | By: FYIcenter | Answer: Ciscosystems | | ID: 22 | Rank: 1410 | Votes: 0 | Views: 310 | Submitted: 20070226 |
1450 :-) | | String Pointers | | What will be printed as the result of the operation
below:
main() {
char *ptr = " Cisco Systems";
*ptr++; printf("%s\n",ptr);
... | | Submitted: 20070226 |
|
1431 :-) | | Character Array | | What will be printed as the result of the operation
below:
main() {
char s1[]="Cisco";
char s2[]="systems";
pri... | | Submitted: 20070226 |
|
1410 :-) | | String Concatenation | | What will be printed as the result of the operation
below:
main() {
char *p1;
char *p2;
p1=(char *)malloc(25);
... | | Submitted: 20070226 |
|
1414 :-) | | Static Variables | | The following variable is available in file1.c, who
can access it?
static int average;
... | | Submitted: 20070226 |
|
1437 :-) | | Constants | | WHat will be the result of the following code?
#define TRUE 0 // some code
while (TRUE) {
// some code
}
... | | Submitted: 20070226 |
|
Copyright © 2009 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|