Write a C program to add two numbers before the main function
is called.
Answers were Sorted based on User's Feedback
Answer / jhansi rani attuluri
#include<stdio.h>
int sum(int a,int b);
int sum(int a,int b)
{
return a+b;
}
main()
{
int a,b,c;
printf("enter the value for a,b:");
scanf("%d %d",&a,&b);
printf("sum is %d\n",sum(a,b));
}
Is This Answer Correct ? | 19 Yes | 45 No |
Write a program to implement the motion of a bouncing ball using a downward gravitational force and a ground-plane friction force. Initially the ball is to be projected in to space with a given velocity vector
#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }
main() { unsigned int i=65000; while(i++!=0); printf("%d",i); }
Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list)
3 Answers Disney, Google, ZS Associates,
Write a C function to search a number in the given list of numbers. donot use printf and scanf
respected sir, i did my MCA in 2013 when i am going to attend to an interview i was asked about my project how will i explain my project could please help me in this and my project title is "Social Networking Site For Social Responsibility"
how to return a multiple value from a function?
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
C statement to copy a string without using loop and library function..
You are given any character string. Find the number of sets of vowels that come in the order of aeiou in the given string. For eg., let the given string be DIPLOMATIC. The answer returned must be "The number of sets is 2" and "The sets are "IO and AI". Vowels that form a singleton set must be neglected. Try to post the program executable in gcc or g++ or in java.
WAP to display 1,2,3,4,5........N