+ 6
what is the use of # in including header file..?? what it mean #..??
20 odpowiedzi
+ 2
simply put, '#' is the language syntax (c,c++ etc) for commanding the preprocessor to include a file. it is like 'import' in python. the c/c++ preprocessor/compilers are coded to recognize '#' character alone as a directive and not any other fancy character like '??'. if you were to create your own language, you could define '??' as your preprocessor directive so that when the compiler sees it, the it knows what to do. it was just a choice by the language creator(s)
+ 4
Simply, we can say that # is a linker. It links any file which is situated outside of a program ( in C libraries). It is a special symbol. It is not an operator but we can say so.. Hope you understand.😁😁😁
+ 4
https://code.sololearn.com/c1j0W4C8FU1G/?ref=app
Try this one :- ☺☺☺
+ 4
# is used to write compiler code, this is actually not interpreted as c++ code.
the # preprocessor directive is used to tell the compiler stuffs to do to make your program compile successfully.
eg: including a header file
#include <iostream>
eg: conditional compilation
#ifdef OS_WINDOWS
#define WIN_RS 0x0551
#if WIN_RS < 0x0552
#warning platform may not be supported!
#endif
#endif
eg: defining symbolic Constants
#define PI 3.142
eg: writing header file guard
#ifndef MY_FILE_H
#define MY_FILE_H
//file class definition goes here
#endif
+ 3
to all now...👍
+ 3
accept the challange code c masters
+ 3
beginners
+ 3
what i want to do now...
+ 2
statements starting with # are preprocessor directives
To include a header file we use
#include<header.h>
It won't work without #, it is a part of the statement
+ 2
See this
https://www.sololearn.com/learn/1743/?ref=app
You cannot use anything else instead of {}. The same way you cannot use anything else instead of #
+ 2
https://code.sololearn.com/c8krUt0Rk897/?ref=app
write in c challange to sowmiya
+ 2
☺️
+ 2
#include<stdio.h>
int main()
{
int a=0,b=1,c,count,num=10;
printf("The series is\n");
printf("%d \n%d\n",a,b);
count=2;
while(count<num)
{
c=a+b;
a=b;
b=c;
printf("%d\n",c);
count++;
}
return 0;
}
+ 2
is it ok..??
+ 2
fine..ok..
yes sure...
+ 1
preprocessor directives means what..??
if i want to know some thing ..i expect meaning for every thing..
+ 1
why can't we use ??= insted of #..
??
is it is possible..??
+ 1
thank you for your brief and clear explaination....:)
+ 1
yes...thank you...
+ 1
yes...