1.What is the output of the program given below?
#include <stdio.h>
#include <stdlib.h>
void main ()
{
char str[]="1352468";
int index=0;
while(str[index]!='\0')
{
printf("%c",str[index]+1);
index++;
}
}
a) 2463579
b) 1352469
2.What will be the output of the following program?
#include <stdio.h>
#include <stdlib.h>
int main()
{
char str[]="birds";
printf("%s",strrev(str));
}
a) sdrib
b) sdrb
No comments:
Post a Comment