Академический Документы
Профессиональный Документы
Культура Документы
decrement statement in C?
There are actually two ways you can do this. One is to use
the increment operator ++ and decrement operator . For
example, the statement x++ means to increment the
value of x by 1. Likewise, the statement x means to
decrement the value of x by 1. Another way of writing
increment statements is to use the conventional + plus sign
or minus sign. In the case of x++, another way to write it
is x = x +1.
https://career.guru99.com/top100cinterviewquestionsanswers/ 1/25
8/5/2017 Top100CInterviewQuestions&Answers
Answer:
1 a=1;
2
3 while (a<=100) {
4
5 printf ("%d\n", a * a);
6
7 a++;
8
9 }
5) What is a stack?
[https://cdn.career.guru99.com/wp-
content/uploads/2012/03/C-Interview-Questions1.jpg]
https://career.guru99.com/top100cinterviewquestionsanswers/ 3/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 4/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 5/25
8/5/2017 Top100CInterviewQuestions&Answers
19) What are header les and what are its uses in C
programming?
23) Can I use int data type to store the value 32768?
Why?
25) Why is it that not all header les are declared in every
C program?
https://career.guru99.com/top100cinterviewquestionsanswers/ 7/25
8/5/2017 Top100CInterviewQuestions&Answers
12
123
https://career.guru99.com/top100cinterviewquestionsanswers/ 8/25
8/5/2017 Top100CInterviewQuestions&Answers
1234
12345
Answer:
https://career.guru99.com/top100cinterviewquestionsanswers/ 9/25
8/5/2017 Top100CInterviewQuestions&Answers
1 if (num % 2 == 0)
2
3 printf("EVEN");
4
5 else
6
7 printf("ODD");
https://career.guru99.com/top100cinterviewquestionsanswers/ 10/25
8/5/2017 Top100CInterviewQuestions&Answers
39) What are logical errors and how does it dier from
syntax errors?
https://career.guru99.com/top100cinterviewquestionsanswers/ 11/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 12/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 13/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 14/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 15/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 16/25
8/5/2017 Top100CInterviewQuestions&Answers
1 If (num>=0)
2
3 printf("number is positive");
4
5 else
6
7 printf ("number is negative");
https://career.guru99.com/top100cinterviewquestionsanswers/ 17/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 18/25
8/5/2017 Top100CInterviewQuestions&Answers
https://career.guru99.com/top100cinterviewquestionsanswers/ 19/25
8/5/2017 Top100CInterviewQuestions&Answers
The basic data types are int, char, and oat. Int is used to
declare variables that will be storing integer values. Float is
used to store real numbers. Char can store individual
character values.
One thing to note is that you cannot pass the entire array
to a function. Instead, you pass to it a pointer that will point
https://career.guru99.com/top100cinterviewquestionsanswers/ 20/25
8/5/2017 Top100CInterviewQuestions&Answers
The gets() function allows a full line data entry from the
user. When the user presses the enter key to end the input,
the entire line of characters is stored to a string variable.
Note that the enter key is not included in the variable, but
instead a null terminator \0 is placed after the last
character.
https://career.guru99.com/top100cinterviewquestionsanswers/ 21/25
8/5/2017 Top100CInterviewQuestions&Answers
1 int temp;
2
3 temp = num1;
4
5 num1 = num2;
6
7 num2 = temp;
https://career.guru99.com/top100cinterviewquestionsanswers/ 22/25
8/5/2017 Top100CInterviewQuestions&Answers
[/#facebook]
[/#twitter]
Top 72 Perl
Interview
6
REPLIES
https://career.guru99.com/top100cinterviewquestionsanswers/ 23/25
8/5/2017 Top100CInterviewQuestions&Answers
VarunGalar
Reply
BiswajitBora
Reply
ananddubey
Reply
sumit
Reply
charanrajh
Reply
vathsow
https://career.guru99.com/top100cinterviewquestionsanswers/ 24/25
8/5/2017 Top100CInterviewQuestions&Answers
Reply
https://career.guru99.com/top100cinterviewquestionsanswers/ 25/25