top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can we print the ; in c without directly mentioning the ; in printing statement?

+4 votes
386 views
How can we print the ; in c without directly mentioning the ; in printing statement?
posted Dec 25, 2015 by Kajana.supriya

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Take a char variable and assign octal value (073). When this char variable is printed using %c format , it prints semicolon .

Sample program:

#include <stdio.h>
int main()
{
  char ch = 073; /* Value in octal */
  printf("%c", ch);
  return 0;
}
answer Dec 25, 2015 by Harshita
Similar Questions
0 votes

I want to write some C code where I want to print a string say "Hello World" but don't want to use semicolun(;), how can I achieve that.

+3 votes

Please help me to print all permutations of a string in C?

...