• edited by
524 views
1 1 vote
We use character array to declare string in C. So, if I declare an array like

character ch[ ] = {‘a’,’k’,’a’,’/o’};

and try printing ch[3] like :

printf(“%C”,ch[3]);

what will be the output ?

Please log in or register to answer this question.

Position:
Show:

Related questions

6 6 votes
2 2 answers
342
342 views
GO Classes asked Jun 24
342 views
What is the output of the following code?#include <stdio.h int main() { char str[] = {'C', 'S', 'E', '\0', 'X'}; printf("%s %c", str, str[4]); return 0; }$\texttt{CSE X}$...
9 9 votes
2 2 answers
338
338 views
GO Classes asked Jun 24
338 views
What is the output of the following code?#include <stdio.h void update(int a[]) { a[0] = a[0] + a ; *(a + 1) = *(a + 1) + 5; } int main() { int arr[] = {2, 4, 6}; update(...
1 1 vote
2 2 answers
2.6k
2.6k views
Shubhanshu asked Jun 10, 2017
2,594 views
#include <stdio.h void my_toUpper(char* str, int index){ *(str + index) &= ~32;} int main(){ char* arr = "gatesquiz"; my_toUpper(arr, 0); my_toUpper(arr,...
1 1 vote
2 answers 2 answers
795
795 views
Durgesh_7979 asked Jun 7, 2023
795 views
char st[] = {‘G’,’A’,’T’,’E’,’\0’};then string ka length 4 hoga ya 5 with null character?