Tuesday, July 20, 2010
warning: return type of �main� is not �int�
When we will compile a c program we may get following error message:
warning: return type of �main� is not �int�
Solution:
Cause of this warning message is return type of main function is not int. It is necessary to return an int value by main function. If main function returns 0 then operating system treat it as success.
For example:
int main(){
//Write your c code.
}
undefined reference to `sqrt' collect2: ld returned 1 exit status
When we will compile a c program in Linux GCC compiler we may get error message:
undefined reference to `sqrt' collect2: ld returned 1 exit status
Cause of this error is by default math.h library has not included.
Solution:
Compile the c code in the following way:
[root@localhost ~]# gcc abc.c -lm
Note: Here abc.c is name of any c code file.
undefined reference to `sqrt' collect2: ld returned 1 exit status
Cause of this error is by default math.h library has not included.
Solution:
Compile the c code in the following way:
[root@localhost ~]# gcc abc.c -lm
Note: Here abc.c is name of any c code file.
undefined reference to `pow' collect2: ld returned 1 exit status
In Linux GCC compiler when we compile a c program may get error message:
Error message: undefined
reference to `pow' collect2: ld returned 1 exit status
Compiler:
Linux gcc
Solution:
Cause of this error is
by default math.h library has not included. So compile the c code in following
way:
[root@localhost ~]# gcc
abc.c -lm
Note: Here abc.c is name
of any c code file.
Monday, July 5, 2010
Advanced c tutorial
Advanced
c concepts or tutorial. It explains advanced c programming by example. It also
includes advanced c language interview questions and answers for experienced.
System Level programming by c program
Write a c program to display mouse pointer
Mouse programming in c
Cursor program by c programming.
How to create virus in c?
How to create dos command in c?
Create dir command in c
If an employee spends 30% of his salary on fooding, 10% on clothing and 15% on other work. In this way he saves 10000 per month. Write a c program to find his total salary.
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
C program to print all odd numbers between 1 and 100
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px 1px;
border: 0px 0px 0px 0px
}
.explanation{
color:#800000;
font-size:25px;
font-weight:900;
letter-spacing:15
}
#include
int main(){
int i;
for(i=1;i<100;i=i+2){
printf("%d\n"
C program for sum of even numbers from 1 to 100
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
compound interest program in c
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
c code for division of two complex numbers
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
c code for multiplication of two complex numbers
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
Write a c program to find the sum of first and last digit of any number
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
C program to find average and percentage of marks in five different subjects.
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px 1px;
border: 0px 0px 0px 0px
}
.explanation{
color:#800000;
font-size:25px;
font-weight:900;
letter-spacing:15
}
C program to find average and percentage of marks in five different subjects.
#include
Write a c program to add two very large numbers
Write a c program to add two very large or big numbers
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px 1px;
border: 0px 0px 0px 0px
}
.explanation{
color:#800000;
font-size:25px;
font-weight:900;
letter-spacing:15
}
#include
#include
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px 1px;
border: 0px 0px 0px 0px
}
.explanation{
color:#800000;
font-size:25px;
font-weight:900;
letter-spacing:15
}
#include
#include
Write a c program which takes distance between two cities in k.m. a and convert it in meter,c.m.,inch and feet.
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
Write a c program to find volume of a cone
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
Write a c program to find volume and surface area of a cube
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
C program to find out area of trapezium
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px 1px;
border: 0px 0px 0px 0px
}
.explanation{
color:#800000;
font-size:25px;
font-weight:900;
letter-spacing:15
}
1. C program or source code for find area of
trapezium
2. How to calculate area of trapezium
C program to find area of an equilateral triangle
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px 1px;
border: 0px 0px 0px 0px
}
.explanation{
color:#800000;
font-size:25px;
font-weight:900;
letter-spacing:15
}
C
program to find area of equilateral triangle
How
to calculate area of an equilateral
c program to find area of right angled triangle
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
c program to find area rectangle
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px
c program to find area of triangle
.fieldsetOut{
background:#1E90FF;
padding:0px 0px 0px 0px;
font-family: "courier new"
}
.fieldsetIn{
background:white;
margin:1px 1px 1px 1px;
padding:1px 1px 1px 1px;
border: 0px 0px 0px 0px
}
.explanation{
color:#800000;
font-size:25px;
font-weight:900;
letter-spacing:15
}
C
program to find area of triangle
C
program to calculate area of triangle
#include<
Friday, July 2, 2010
C interview questions pdf
C Programming language fresher or beginner interview questions and answers in PDF format free to download
1. C interview questions pdf
2. C questions and answers
3. C pointer questions pdf
4. C objective questions pdf
C questions and answers pdf
1. C interview questions pdf
2. C questions and answers pdf
3. C pointer questions pdf
4. C objective questions pdf
Thursday, July 1, 2010
pointers questions pdf
C
programming language objective type questions and answers with explanation on
pointers for interview and written test quiz exam in pdf format free download
1. C interview questions pdf
2. C questions and answers
3. C pointer questions pdf
4. C objective questions pdf
If you have any queries or suggestions on above c
tricky pointers questions pdf, please share it.
Subscribe to:
Posts (Atom)