Showing posts with label Gate questions on C programming. Show all posts
Showing posts with label Gate questions on C programming. Show all posts

Wednesday, December 9, 2015

GATE Questions - C Programming

20 comments:
Previous GATE questions with solutions on C Programming - CS/IT

GATE-2000
1. The number of tokens in the following C statement. 
printf("i = %d, &i = %x", i, &i);
is
(a) 3   (b) 26   (c) 10    (d) 21


Ans: option (c)
Explanation:
The smallest individual units are known as C Tokens. The keywords, identifiers, constants, string literals, and operators described in this section are examples of tokens. Punctuation characters such as brackets ([ ]), braces ({ }), parentheses ( ( ) ), and commas (,) are also tokens.