61. What would be the Output?
int main()
{
typedef int Currency;
Currency Dollar=10;
Currency Pound = 20;
printf("%d, %d", Dollar, Pound);
}
Answer: 10,20
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
62. void main()
{
char input[] = "SSSWILTECH1\1\1";
int i, c;
for ( i=2; (c=input[i])!='\0'; i++)
{
switch(c)
{
case 'a': putchar ('i'); continue;
case '1 ': break;
case 1: while
(( c = input[++i]) != '\1' && c!= '\0');
case 9: putchar('S');
case 'E':
case 'L': continue;
default: putchar(c);continue;
}
putchar(' ');
}
putchar('\n');
}
Answer: SWITCH1S
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
63. A recursive function would result in infinite recursion, of the following were left out:
Answer: Base call
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
64. void fn(int *p)
{
static int val = 100;
p = &val;
}
main()
{
int i=10;
printf("i=%d\n", i);
fn(&i);
printf("i=%d\n", i);
}
What is the o/p of the above code?
Answer: i=10 i=10
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
65. What will print out?
#include
void main()
{
char *p1="name";
char *p2;
p2=(char*)malloc(20);
memset (p2, 0, 20);
while(*p2++ = *p1++);
printf("%s\n",p2);
}
Answer: empty string
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America) Societe Generale
66. Time taken for addition of element in queue is
Answer: O(1)
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America) Societe Generale Capgemini
67. To create a linked list, we can allocate space and make something point to it, by
writing:
struct-narne *pointer-variable;
Which of the following statement will correctly allocate the space
Answer: pointer-variable= malloc(sizeof(*struct-narne));
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America) Capgemini Accenture
68. fputs function is used to
Answer: Requires a file pointer
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
69. We all know that a const variable needs to be initialized at the time of declaration. Then what will be the output of the program given below, even when we have not initialized p?
void main()
{
const char *p ;
p="A const pointer" ;
cout << p;
}
Answer: A const pointer
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
70. char a[5] ="hello"
What is wrong in the above syntax?
Answer: Size of a is too small
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)