61. What will be the output of the following C code if the input given to the code shown below is "examveda"?
#include<stdio.h>
#define NL '\n'
void main()
{
void f(void);
printf("enter the word\n");
f();
}
void f(void)
{
char c;
if((c=getchar())!=NL)
{
f();
printf("%c",c);
}
return;
}
#include<stdio.h>
#define NL '\n'
void main()
{
void f(void);
printf("enter the word\n");
f();
}
void f(void)
{
char c;
if((c=getchar())!=NL)
{
f();
printf("%c",c);
}
return;
}
62. A machine in which the least significant byte is stored in the smallest address is . . . . . . . .
63. What is the difference between the following 2 C codes?
#include <stdio.h> //Program 1
int main()
{
int d, a = 1, b = 2;
d = a++ + ++b;
printf("%d %d %d", d, a, b);
}
#include <stdio.h> //Program 2
int main()
{
int d, a = 1, b = 2;
d = a++ +++b;
printf("%d %d %d", d, a, b);
}
#include <stdio.h> //Program 1
int main()
{
int d, a = 1, b = 2;
d = a++ + ++b;
printf("%d %d %d", d, a, b);
}
#include <stdio.h> //Program 2
int main()
{
int d, a = 1, b = 2;
d = a++ +++b;
printf("%d %d %d", d, a, b);
}
64. What will be the output of the following C code?
#include<stdio.h>
extern inline int min(int a, int b)
{
return a < b ? a : b;
}
main()
{
int m;
m=min(3,-5);
printf("%d",m);
}
#include<stdio.h>
extern inline int min(int a, int b)
{
return a < b ? a : b;
}
main()
{
int m;
m=min(3,-5);
printf("%d",m);
}
65. What will be the output of the following C code?
#include<stdio.h>
int main()
{
signed char ch= ‘a’;
printf(“%u”,ch);
return 0;
}
#include<stdio.h>
int main()
{
signed char ch= ‘a’;
printf(“%u”,ch);
return 0;
}
66. What will be the output of the following C code?
#include <stdio.h>
void inline func1(char b[10])
{
printf ("%c\n",b[2]);
}
int main()
{
func1("examveda");
return 0;
}
#include <stdio.h>
void inline func1(char b[10])
{
printf ("%c\n",b[2]);
}
int main()
{
func1("examveda");
return 0;
}
67. Which of the following declaration is not supported by C language?
68. What will be the output of the following C code?
#include<stdio.h>
int main()
{
int n=10;
int f(int n);
printf("%d",f(n));
}
int f(int n)
{
if(n>0)
return(n+f(n-2));
}
#include<stdio.h>
int main()
{
int n=10;
int f(int n);
printf("%d",f(n));
}
int f(int n)
{
if(n>0)
return(n+f(n-2));
}
69. Iteration requires more system memory than recursion.
70. What will be the output of the following C code?
#include<stdio.h>
int main()
{
printf("Hello");
main();
return 0;
}
#include<stdio.h>
int main()
{
printf("Hello");
main();
return 0;
}