i want to initialise structure array only when needed. what to do
#include<stdio.h> int main() { double a,b,c; printf(“Enter the temprature in fahrenheit “); scanf(“%e”,&a); c=1.8*a+32; b=1.8*a+32+273.16; printf(“the conversion in fahrenheite %e celcius is %3.2e and is %6.2\n”,a,c,b); return 0; } i am reading the value through scanf and storing the value … Continue reading
int ten = 10; int two = 2,z=3; printf(“Doing it right: “); printf(“%d minus %d is %d \n”,ten,2,ten-two); printf(“Doing it wrong: “); printf(“%d minus %d is %d\n”,ten); // In this function i have not used the variable name “ten” then … Continue reading
#include<stdio.h> int main() { long double mwt = 3.0e-23; printf(“%LF”,mwt); return 0; } why o/p is ./seventeen 0.000000 root@linuxstation asgmt#
For the third question in the second assignment, the output has an extra character ‘S’ printed. This indicates that the switch case with the value ’9′ was run. But there is no apparent code that puts 9 to the value … Continue reading
Compilation process in general is split into roughly 5 stages and those are as follows:- 1. Preprocessing 2. Parsing 3. Translation 4. Assembling 5. Linking
Completed assignment 1, started second assignment
Compilation Steps For a Hello World program : #include<stdio.h> int main() { printf(“Hello World \n”); return 0; } Step One :The C preprocessor implements the macro language used to transform C,C++, and Objective-C programs before they are compiled. aregee@linuxstation src_projects$ … Continue reading
successfully completed the master array working on assignment 1
int main() { int value=100; printf(“value in decimal is:%d\n”,value); printf(“value in hexa is:%x\n”,value); printf(“value in octal is:%o\n”,value); return 0; } in this program i m getting the following error undefined reference to print ld returned 1 exit status how can … Continue reading
#include #include #include //int debug(const char*,const char*[10],char*); int say(char*); int say_num(int*); int* sum(int*,int*); int fact(int); int find_addr(); int back(); int main() { printf(“%s -> %p”,__func__,&__func__); char *b=”hello world”; char c[]=”humpty dumpty sat on a wall”; int d[]={1,2,3,4,5,6,7,8,9,0}; printf(“\n%d”,say(b)); printf(“\n%d”,say_num(d)); printf(“\n%d”,*(sum(d+1,d+2))); … Continue reading
assignment 1 and 2 completed. looking forward to make notepad like program using FILE I/O
which command prompt can display all the header files of stdio.h?