为您找到"
#include <stdio.h> void main() { int a[]={1,2,3
"相关结果约100,000,000个
I'm learning C language and stuck with a question as follows: #include #include void main() { short int a=5; clrscr(); printf("%d"+1,a); getch(); } Please explain what is the output of this program. Thanks .
#include<stdio.h> int main() { int a = 5; int *ptr ; ptr = &a; *ptr = *ptr * 3; printf("%d", a); return 0; }
The printf() is a library function to send formatted output to the screen. The function prints the string inside quotations. To use printf() in our program, we need to include stdio.h header file using the #include statement. The return 0; statement inside the main() function is the "Exit status" of the program. It's optional.
We must include stdio if we wish to utilise the printf or scanf functions in our application. The void main () indicates that the main () function will not return any value, but the int main () indicates that the main () can return integer type data.
C Programming questions and answers section on "C Preprocessor Find Output of Program" for placement interviews and competitive exams: Fully solved C Programming problems with detailed answer descriptions and explanations are given for the "C Preprocessor Find Output of Program" section.
include"stdio.h"和include区别 creq35640 于 2011-07-12 00:13:07 发布 阅读量2.2k 收藏 1 点赞数 文章标签: c/c++ 移动开发
Consider the following $\mathrm {C}$ program: #include void fX (); int main ... output The program will terminate with $1234$ as output
#include int main() { int a = 1, b = 2, c = 3; c = a == b; printf("%d", c); return 0; } Choose the correct answer: (A) 0 (B) 1 (C) 2 (D) 3 Answer : (A) Explanation : "==" is relational operator which returns only two values, either 0 or 1. 0: If a == b is false 1: If a == b is true Since a=1 b=2 So, a == b is false hence C = 0. 2.
Consider the following C program #include<stdio.h> int main() { static int a[] = {10, 20, 30, 40 ... ptr); } The output of the program is _______.
int i=0, j=1; The above statement declares and initializes two global variables. void f(int *p ,int *q) { % A % p=q // The address stored in pointer 'q' is assigned to pointer'p' % B % *p=2 //The value at the address stored in pointer 'p' is set as 2. } Now in the main function the function 'f' is called with the address of variable 'i' and 'j' as parameters. Let us assume address of i=100 and ...