Strings in C

0
72

What would be the output of the below program

#include<stdio.h>
int main()
{
	printf(5 + "Good C Programming");
	return 0;
}

What would be the output of the below program

#include<stdio.h>
int main( )
{
	char str1[ ] = {'H', 'e', 'l', 'l', 'o' } ;
	char str2[ ] = "Hello" ;
	printf("%s ", str1);
	printf("%s", str2);
	return(0);
}

What would be the output of the below program

#include<stdio.h>
int main()
{
  printf("%c", "CProgramming"[4]);
  return 0;
}

LEAVE A REPLY

Please enter your comment!
Please enter your name here